Home > Backend Development > PHP Tutorial > PHP connection mysql connection is reset solution_PHP tutorial

PHP connection mysql connection is reset solution_PHP tutorial

WBOY
Release: 2016-07-13 10:26:50
Original
785 people have browsed it

The problem of php connecting to mysql under windows 7, the solution to the reset of php connecting to mysql connection, friends in need can refer to it. After installing a new Windows 7 64-bit system, I configured a lot of things, and I always had this and that feeling. Yesterday when I started configuring php+apache, echo phpinfo() was completely fine, but once I connected to mysql, it would not work. Presents the problem of the page being reset. It turned out that the problem was not big, but I came to misunderstandings: 1. I suspected a problem with the 64-bit system; 2. I felt that the code was unreliable, because it can be executed in other places, and it can be displayed if I write substr() rashly.... .. This problem has been bothering me for more than a day, but I still haven't solved it. In desperation, I searched using the keyword "php connection to mysql connection was reset", and a lot of sporadic information appeared, one by one. After searching, someone finally mentioned that it was due to the reference problem of libmysql.dll. I read it with great excitement and followed it. Maybe I was even willing to restart my computer because I was afraid that the cache there would be wasted. It was finally solved later. ----------This incident made me realize the importance of misunderstandings. I post the solutions here, hoping that people who encounter them can use them. Try copying libmysql to windows/system32 and copy libmysql.dll to apache/bin. Of course, the easiest way is: In apache: LoadFile D:/PHP/php5.2.13/libmysql.dll With only the above line, mysql can be successfully called. My server version: win7 apache 2.2.13 php 5.2.13 mysql5.1.37 phpmyadmin3.3.2 The following is the partial configuration of my apache. 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

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/822513.htmlTechArticleThe problem of php connecting to mysql under windows7, the solution to the reset of php connecting to mysql connection, friends in need can refer to it Down. After installing the new Windows 7 64-bit system, there are many things equipped...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template