“Premature end of data” error with PHP

前端 未结 4 1144
无人共我
无人共我 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 08:06

    That you are connecting to localhost suggests that you probably don't have network problems.

    First hit in Google lists 2 possible causes/remedies.

    This message appears when one is using PHP 5.3... with MySQL database that is intended to be used with PHP 5.2... I noticed that when I changed to another version of Uniform Server.

    If you don't have access to the database and are mainly using this remote connection to development purposes (like me) a solution to the is to have configurations with both PHP versions (currently the latest Uniform Server with PHP 5.2... appears to be 5.6b-Nano with PHP 5.2.13).

提交回复
热议问题