After the 64-bit Windows 7 system is installed, many things are arranged, which is always the same. Yesterday, when we started to configure php + apache, echo phpinfo () was no problem, however, when you connect to mysql, the page is reset. The problem was not serious, but I had a misunderstanding:
1. I suspect that the 64-bit system is faulty;
2. I feel that the code is unreliable, because it can be executed in other ways. It is also possible to rashly write a substr ().
......
This problem has been entangled for more than a day, but it still cannot be solved. In desperation, I used the keyword "php connection mysql Connection Reset" to hold a search, showing a lot of sporadic information, one query was finally mentioned because of libmysql. dll references. I was so excited that I had to watch it and follow the instructions. Or even I was willing to restart my computer. I was afraid that the cache would be enough. It is finally solved later. ----------- I am aware of the importance of misunderstanding. I will post the solution here, hoping that some people will be able to use it.
Test libmysql plugin is written to windows/system32 and libmysql. dll is copied to apache/bin.
Of course, the most convenient method is:
In apache:
LoadFile D:/PHP/php5.2.13/libmysql. dll
Mysql can use only the row above.
My server version: win7
Apache 2.2.13
Php 5.2.13
Mysql5.1.37
Phpmyadmin3.3.2
Below is the configuration of My apache department.
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