For the apache environment, refer to the following solution.
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.
However, all methods have been tried and cannot be solved, so I searched for mysql_connect () not supported,
Save the following code as phpinfo. php:
<? Php
Phpinfo ();
?>
If the iis environment is used, refer to the following solution:
Note the following when integrating IIS and PHP:
Install PHP
(1) decompress the downloaded php-5.1.4-win32.zip file and copy it:
X:/Server_Core/PHP;
(2) enter the X:/Server_Core/PHP folder and rename php. ini-dist to php. ini;
(3) open the php. Ini file and find:
Extension_dir = "./"
Change it;
Extension_dir = "X:/Server_Core/PHP/ext"
(4) Find Windows Extensions.
In the dynamic module configuration under Windows Extensions, you need to enable the following module support: (remove the number before each line of the module configuration)
Extension = php_mbstring.dll
Extension = php_gd2.dll
Extension = php_mysql.dll
(5) find:
Disable_functions =
Changed:
Disable_functions =
Passthru, exec, system, popen, chroot, escapeshellcmd, escapeshellarg, shell_exec, proc_open, proc_get_status four of them:
--------------------------------------------------------------------------------
(4) Find Windows Extensions.
In the dynamic module configuration under Windows Extensions, you need to enable the following module support: (remove the number before each line of the module configuration)
Extension = php_mbstring.dll
Extension = php_gd2.dll
Extension = php_mysql.dll -----> The above error is reported because the semicolon ";" in front of this line is not removed. That is, remove the semicolon and restart the Apache server !!!