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
2009-12-08 05:04:53
had to download the 5.2.x(manual install version)
2009-12-08 05:29:10
my php app requires a function from 5.3, this is great
2009-12-08 05:40:34
+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 :
- Resolving the "OK packet 6 bytes shorter than expected"
- MySQL PHP incompatibility.
- Backward Incompatible Changes
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
2009-12-08 05:16:37
yes this worked SET PASSWORD FOR 'username'@'hostmask' = PASSWORD('thepassword')
2009-12-08 06:02:26
Great news ;-) ;; And nice to see more and more questions about PHP 5.3 ! Have fun !
Pascal MARTIN
2009-12-08 06:12:54