MySQL PHP incompatibility.

Posted by Evernoob on Stack Overflow See other posts from Stack Overflow or by Evernoob
Published on 2009-08-27T11:30:38Z Indexed on 2010/06/11 3:13 UTC
Read the original article Hit count: 261

Filed under:
|

Ok maybe I've overlooked something really simple here, but I can't seem to figure this out.

I'm running WAMP locally, but connecting to a remote MySQL database. The local version of PHP is the latest 5.3.0.

One of the remote databases, being version 5.0.45 works fine. However, the other remote database I'm trying to connect to, which is version 5.0.22 throws the following error before dying:

Warning: mysql_connect() [function.mysql-connect]: OK packet 6 bytes shorter than expected. PID=5880 in ...

Warning: mysql_connect() [function.mysql-connect]: mysqlnd cannot connect to MySQL 4.1+ using old authentication in ...

WTF?

UPDATE:

Reverting to PHP 5.2.* i.e. anything lower than 5.3.0 resolves the problem completely. As long as I am not running 5.3.0 I can connect to both databases. I'm not sure what the explanation is for this weirdness.

© Stack Overflow or respective owner

Related posts about php

Related posts about mysql