When configuring the environment, PHP cannot load the MySQL dynamic library. please take a look! The environment is WinXP, Apache2.2, PHP5.2.17, and Mysql5.5.23. apache and PHP are installed normally. Later, after I installed Mysql, it was indeed installed successfully. Access to Mysql through the command line was successful, and Port 3306 was indeed when Mysql was listening: & nbs configuring the environment, PHP cannot load MySQL dynamic databases. please take a look!
Environment:
Win XP, Apache 2.2, PHP 5.2.17, Mysql 5.5.23
There is no problem when installing apache and PHP, and Apache parses PHP normally. Later, after I installed Mysql, it was indeed installed successfully. Access to Mysql through the command line was successful, and Port 3306 was indeed monitored by Mysql:
TCP 0.0.0.0: 3306 0.0.0.0: 0 LISTENING 3296
Using mysqld.exe]
So I made the following settings in php. ini:
PHP code
extension_dir = "D:/MyEnv/php5/ext"extension=php_bz2.dllextension=php_mysql.dllextension=php_mysqli.dllextension=php_pdo.dll
Restart Apache and use mysql_connect () for testing, but it always reports the Call Undifined Function.
Then I checked it with phpinfo () and found that the Mysql database was not loaded. I have been pondering for a long time and I have not succeeded ~~~
There should be no problem with my steps. Why can't I load the Mysql database ??
Thank you!
------ Solution --------------------
1. confirm that the extension path is correct.
2. Copy "libmysql. dll and php5ts. dll" in the php installation directory to the C:/windows/system32 directory.
3. copy php. ini to the C:/windows directory.
Restart apache
------ Solution --------------------
Is the php. ini file displayed in phpinfo the one you modified?
Is there a required dll file in the extension directory of php?
Is the ext directory path in the php. ini file normal?
------ Solution --------------------
If you have set PHPIniDir in httpd. conf and point to the correct path
In this case, if you want to copy files, it indicates that the apache installation is faulty.