Newly installed Windows7 64-bit system, equipped with a lot of things, always have such a son of thwart, yesterday in the beginning with the arrangement Php+apache, Echo phpinfo () completely no problem, but once connection MySQL will render the page is reset problem. The original problem is not big, but I went to the misunderstanding:
1, I suspect the problem of 64-bit system;
2, I feel the code is unreliable, because the other can be executed, lightly write a substr () can also be displayed
......
This problem tangled my day more, but still did not solve, helpless under I use "PHP connection MySQL connection was reset" for the keyword search, presented a lot of sporadic information, a 1 to find, finally someone mentioned is due to libmysql.dll reference problem. With an extremely excited mood to read, and refer to the implementation, or even I would rather restart the computer, I am afraid of the cache there for the rest. The latter is finally settled. -----------This thing let me know the importance of misunderstanding, here to solve the way to paste out, I hope to have met the people can be used to suffer.
The quiz exam libmysql into windows/system32 and libmysql.dll copy to Apache/bin.
Of course, the easiest way to do this is:
In Apache:
LoadFile D:/php/php5.2.13/libmysql.dll
Only this line, 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 the layout of my Apache department.
Phpinidir d:/php/php5.2.13 #不是必须
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
The above describes the MSSQL PHP connection MySQL connection is reset the solution, including the MSSQL content, I hope to be interested in PHP tutorial friends helpful.