Mysql_connect () does not support PHP configuration errors.

Source: Internet
Author: User

This problem occurs when you set up PHP + Apache + MySql in the 64-bit System of win7 flagship edition. The following are the solutions to this problem:

First, I searched for this error and found many problems. Most of the solutions are as follows:

1. libmysql is missing in the System32 (c: \ windows \ system32) Directory of the system. DLL file. The solution is to find libmysql in the PHP Directory. DLL, and libmysql. copy the DLL to the c: \ windows \ system32 directory and restart the web service.

2. php In the C: \ Windows Directory. in the INI file, the previous ";" in "; Extension = php_mysql.dll" is not removed, so the corresponding function cannot be used. The solution is to open PHP. INI file found; Extension = php_mysql.dll changed

Extension = php_mysql.dll // remove the previous one to make it take effect.

3. the MySQL directory has no read permission. The correct directory permission is as follows:

Full administrator control
Full system control
Users read and run + list folder directories + Read
Delete all other user permissions, and restart MySQL and Web services.
(Note: The preceding settings do not have security settings. We recommend that you modify the settings and restart the server)
Important. Check PHP. check the permissions of the INI file, the permissions of the PHP file copied to system32, And the permissions of the PHP installation directory folder. at least users default permissions are required. the temp folder must have at least the Users Group modification level permission.

The above is the solution on the Internet, or not. I have tried it for three days. I am so depressed that I only want to use it for local testing, otherwise, it would be very troublesome to transmit data between the server and the local server, so I am unwilling to continue searching for mysql_connect () not supported:

Save the following code as phpinfo. php: <? Phpphpinfo ();?> Put it in the directory where discuz is located and access it using a browser. then in phpinfo. search for MySQL strings on the PHP display page. if MySQL has been installed and the php_mysql module is correctly loaded, you can see a table similar to the following: MySQL ------- MySQL support enabledactive persistent links 1 active links 1 client API version 5.0.37 ------- if not, if you confirm that the database has been installed, you may need to load libmysql on the server. DLL: Open httpd. conf (this is the Apache configuration file), add: LoadFile "Your PHP Directory/libmysql. DLL "and then restart the HTTP service.

I did the same, but what is displayed after opening is:

<? Phpphpinfo ();?> I am very depressed. I don't know if my code is wrong, but I still have no choice but to continue the test according to the next step.

========================================================== ======================================

So I searched "No MySql in phpinfo ()" and copied php_mysql.dll, php_mysqli.dll, and libmysql. dll in the upper-level directory to system32.

Add the PHP Directory to the Windows system path,

In Windows NT, 2000, XP, and 2003:

  • Go to the control panel and open the "System" icon (START-> Settings-> Control Panel-> system, in Windows XP/2003: Start-> Control Panel-> System)

  • Select "advanced" tab

  • Click "environment variable ".

  • In the system variables Column

  • Locate path (you may need to scroll down to find it)

  • Double-click the path item.

  • Add your PHP Directory at the end, including the previous ";" (for example:; C: \ PHP)

  • Click "OK" and restart the computer.

========================================================== ======================================
The important issue is the issue between ====. php_mysql.dll and php_mysqli.dll are not under system32. I copied them and added the PHP Directory in path.

After the modification, restart the computer and log on to 127.0.0.1/phpMyAdmin. Sadly, the "mysqli extension is missing" is displayed, which makes me very sad, but I have not used phpMyAdmin any more, as a MySQL management tool, I used navicat8 and uploaded it, navicat8_mysql_cs
Http://1000eb.com/71h8, the need of friends can download, if the failure, you can find it online, or directly contact me, qq10104612, but I am a little impatient, can not say phpMyAdmin can not open normally, it means that I cannot connect to MySQL. I have installed thanksaas and DZ, And I have succeeded. Now that the thanksaas program and DZ program have been successfully installed, it means that this is okay. The first thing to say is, I used the one-click installation package of phpcms, pc_webserver9, which has a good overall effect. At first, I thought that the MySQL and PHP versions in the one-click installation package were not caused by the 64-bit version, now it seems that this method is feasible, at least I have done it now !!

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.