PHP connection mysql connection reset solution

  • 2020-03-31 21:29:37
  • OfStack

After the new installation of windows7 64-bit system, equipped with a lot of things, there is always such a look like the dawn, yesterday in the start of PHP +apache configuration, echo phpinfo() is completely fine, but once connected to mysql will be presented with the page reset problem. It wasn't a big deal, but I went wrong:
1. I suspect problems with 64-bit systems;
2, I feel the code is unreliable, because the other can be executed, rashly write a substr() can also be shown
.
This problem puzzled me for more than a day, but still did not solve to, but I used "PHP connection mysql connection was reset" for the keyword search, presented a lot of scattered information, one by one to find, finally someone mentioned that is due to the libmysql.dll reference problem. Holding a very excited mood to see the end, and refer to the implementation, or I would rather restart the computer, I'm afraid that the cache there to delay. Then we finally solved it. -- this matter let me know the importance of misunderstanding, here the solution posted, hope to meet people can use.
Test libmysql under Windows /system32 and libmysql.dll under apache/bin.
Of course, the easiest way is:
In the apache:
LoadFile: D/PHP/php5.2.13 libmysql. DLL
On this line alone, mysql can be successfully appropriated.
My server version: win7
Apache 2.2.13
PHP 5.2.13
mysql5.1.37
phpmyadmin3.3.2
Below is my apache department layout.
PHPIniDir D:/PHP/php5.2.13 # not required
LoadFile: D/PHP/php5.2.13 php5ts. DLL
LoadFile: D/PHP/php5.2.13 libmysql. DLL
LoadModule php5_module D: / PHP/php5.2.13 php5apache2_2. DLL
AddType application/x - HTTPD - PHP. PHP

Related articles: