The solution to solveing this problem has been given before in one of the tutorials posted at the forum.
I would instead suggest upgrading to a newer version of PHP.
if you are running MySQL 5.0 you will need to use mysqli instead of mysql extention.
You will not be able to connect to it with php4.
I do recommend upgrading to MySQL 5.0 and moving to PHP5.1 (using mysqli ofcourse).