A workaround for PHP connection to MySQL connection being reset

Source: Internet
Author: User
Tags reset

 windows7 PHP connection mysql problem, PHP connection MySQL connection is reset solution, need friends can refer to. New installed Windows7 64-bit system, equipped with many things, there is always such a son of Congi, yesterday in the beginning to decorate Php+apache, echo phpinfo () completely no problem, but the once connection MySQL will render the page is reset problem. It turns out that the problem is not but I went to the wrong place:   1, I suspect 64-bit system problem;   2, I feel the code is not reliable, because the other can execute, frivolous write a substr () also can show the   ...   This problem tangled me A day more, but still did not solve, but I use the "PHP connection MySQL connection was reset" for the keyword search, presented a lot of sporadic information, a 1 find, finally someone mentioned is due to the Libmysql.dll reference problem. With an extremely excited mood to read, and the reference to implementation, or even I would rather restart the computer, I am afraid of the cache there to put. The back was finally resolved. -----------This thing let me know the importance of misunderstanding, here the solution to paste out, I hope to meet people can use.   Test Libmysql windows/system32 and Libmysql.dll copy to Apache/bin.   Of course, the most convenient way is:   in Apache:   loadfile d:/php/php5.2.13/libmysql.dll   only above this line, MySQL can be successfully misappropriated.   My server version: Win7   apache 2.2.13   PHP 5.2.13   mysql5.1.37   phpmyadmin3.3.2   Below is my APA. Che's department is equipped with a layout.   Phpinidir d:/php/php5.2.13 #不是必须   loadfile d:/php/php5.2.13/php5ts.dll   LoadFile d:/php/php5.2.13/li Bmysql.dll   LoadModule Php5_module D:/php/php5.2.13/php5apacHe2_2.dll   AddType application/x-httpd-php. PHP

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.