Im facing a very basic problem when migrating from PHP 4.3 and MySQL 4.0.12 with Apache 2.* on RedHat Linux 9.
My old configuration was PHP 4.0.6 and MySQL 3.23.56 with Apache 1.* on RedHat Linux 7.3.
The problem is with mysql_connect(host, usrname, pwd) return value.
I used the following code for connection to MySQL server.
$conn = @mysql_connect(host, usrname, pwd)
if((int)$conn == 1){
.......
}
Now the problem is that my old configuration returns 1 with (int)$conn and new configuration returns 2 with the same statement. Therefore my old PHP scripts doesn't work with this new configuration. As no. of scripts already developed are in large number, it would take much effort to modify them. Is there any way out?
Also I have checked the same new configuration on windows 98 and it works fine i.e. it returns 1 but not on RedHat Linux 9.
Please help me. Thanx in advance