“Premature end of data” error with PHP

前端 未结 4 1146
无人共我
无人共我 2020-12-06 07:29

I\'ve just started using WAMP for a PHP project and I get the next errors related with this line of code:

$link=mysql_connect(\"localhost\",\"myuser\",\"mypa         


        
4条回答
  •  难免孤独
    2020-12-06 07:56

    The above problem occurs because of version in-compatibility between PHP and MySQL. Mostly it may occur during remote access of db.

    Kindly check your PHP and MySQL versions.

    My versions are PHP-5.3.6 (Local machine) and MySQL 5.1.56 (Live DB).

    My MySQL is placed in live domain and I kept my PHP files in local machine. I faced the same password rest problem.

    Then I replace my XAMPP with older version it changed my PHP version to 5.3.0. Now the above problem was solved and I am able to access the live db from local.

提交回复
热议问题