PROBLEM:
When I try to run the site on localhost I get
Warning: mysql_connect(): OK packet 6 bytes shorter than expected in C:\wamp\www\conn\connection.php on line 2
Warning: mysql_connect(): mysqlnd cannot connect to MySQL 4.1+ using old authentication in C:\wamp\www\conn\connection.php on line 2
Could not Connectmysqlnd cannot connect to MySQL 4.1+ using old authentication
SOLUTION:
Lots of people ran into this same problem, but very few posts were any help. I followed this guy's hints. My wamp installation was using PHP 3.0 but my server where the code was working fine used PHP 5.2.6. I'd like to know why this is a problem, but not badly enough to spend my time on it. Do this:
- Figure out what the functioning version of PHP is Create a phpinfo page, put it where you can see it, check the version and then delete it:
<?php phpinfo(); ?>
- Download that version of WAMP
Go here to do it. Just pick the correct version & click to download.
- Install itShutdown WAMP if you have it running and then double click - it's self installing.
- Restart WAMP and select your version of PHPSelecting the php version is as simple as clicking on the tray icon, going to the PHP directory, going to the 'version' directory and picking your version. When you click on it WAMP will restart using that executable.
- Check it in the browser
God I hoped that worked...
No comments:
Post a Comment
Hit me