tags:

views:

479

answers:

2

I am getting PDO::__construct(): OK packet 6 bytes shorter than expected in latest PHP 5.3.1, any idea or fixes?

A: 

I'm assuming you're using MySQL since this error usually occurs with in. This indicates some sort of incompatibility between PHP and MySQL. Without knowing the exact situation (version numbers, upgrades done, etc.) it's hard to diagnose.

I really shouldn't say this, but in many cases downgrading to PHP 5.2.x will fix the problem instantly.

Dumb Guy
had to download the 5.2.x(manual install version)
my php app requires a function from 5.3, this is great
+1  A: 

If you are using the new mysqlnd driver (which is often the case with PHP 5.3, as it's one of the new stuff introduced with 5.3), you cannot connect to a MySQL database using the old-passwords system.

See, for instance :

Not sure it's what is causing the problem in your case, but that's one common MySQL related thing, with PHP 5.3...

Pascal MARTIN
yes this worked SET PASSWORD FOR 'username'@'hostmask' = PASSWORD('thepassword')
Great news ;-) ;; And nice to see more and more questions about PHP 5.3 ! Have fun !
Pascal MARTIN