In Windows 7, the php connection to mysql is solved. For more information about how to reset the connection to mysql, see. 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
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service