Jim & Sara Feldman wrote:
Hi:
I have recently upgraded from a Mac G4 running OS 10.3.9 to a G5
running OS 10.4. I ported a working PHP app and upgraded from PHP 4.3.4
to 4.3.10 and MySQL 4.0.17 to 4.1.11. I am having a problem connecting
to MySQL from PHP.
I can connect to the database using either phpMyADMIN or directly
from terminal mode using MySQL commands. However, when I try to enter
the database from php, using
$result = mysql_pconnect("localhost", "api_user", "97533");
I get $result = FALSE. This command works on the old system as does the
MySQL command:
Jim :
The problem here is that with MySQL 4.1.xx -- MySQL changed the way
that passwords should be connect by clients to the server. PHP 4.3.10
is still using the old client libraries of MySQL, which do not
understand the new password schemes.
The command line client (mysql) works because its using the new
libraries that came with MySQL 4.1.11.
You have two options. You can either upgrade to PHP5 and use the
mysqli_* functions -- or you can restart MySQL with the --old-passwords
switch which will allow it to accept connections from older clients.
See http://php.net/mysqli and
http://dev.mysql.com/doc/mysql/en/old-client.html for more information.
Warmly,
Burhan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php