I am trying to help look at some bugs and wanted to downgrade from PHP 5.1.1 to PHP 4.4.2 but after I do so I seem to not be able to connect to my MySQL 5.0.17 server. I am working on a Windows XP Pro workstation and using Apache 2.0.55. PHP 4.4.2 is working fine with the mysql section on the phpinfo page. MySQL is also working as I can connect through the mysql command. When I switch back to PHP 5.1.1 (change the php.ini file, set the path variables, and reconfigure Apache) it works fine. Any suggestions as to what might be causing the connection error?
I assume the error_log file tells you the error that is happening.
Are you sure you are using the right mysql extension? I seem to remember there are two different mysql extensions in PHP 4.4.x, aiming at different MySQL versions.
The problem was not with the mysql extension - it was the infamous 'old password' issue where if you are using an older client (which php 4.4.2 does) then you must tell mysql to use old passwords. I downloaded and installed mySQLAdministrator, set old passwords on and then went to my user account and changed the password. Then I restarted the mysql server to ensure a privilege flush and all works fine with the PHP 4.4.2, MySQL 5.0.17 install. Peace.