When configuring the environment, PHP cannot load the MySQL dynamic library. please take a look! What should I do?

Source: Internet
Author: User
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.

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.