Thoughts on the configuration solution when php cannot load mysql module _ PHP Tutorial

Source: Internet
Author: User
Thinking about the configuration solution when php cannot load the mysql module. After that, we can see that the mysql module is not found in phpinfo (). The so-called solution, such as "put php. ini" into C: Windows environment variables, is unreliable ..... Even after copying the ex file, the mysql module is not found in phpinfo (). The so-called solution is as follows. "ini" into the C: \ Windows environment variables and other unreliable statements .....

Even copy the dll of the ext folder to System32.

It's not reliable until I see this post.

Http://www.haosblog.com/index.php? Mod = article_read & id = 322

"The reason why mysql cannot be found is that the mysql runtime library cannot be found. open the mysql installation folder and find libmySQL in the bin folder. dll, copy it to the system32 folder, so that the mysql runtime library can be registered in the system, and then restart Apache"

I found it in the \ MySQL Server 5.5 \ lib Directory

In fact, you should find that it is not an environment variable or not loaded to php. ini or extension when you configure it yourself.

Why?

First, the php configuration path has been added to the Apache configuration.

At the same time, phpinfo () is also loaded. if you are interested, try the difference between the existence and absence of php. ini.

Secondly, I have configured extension_dir in php. ini. if this is meaningless, why should I have this option in the configuration file? Note that the separator is the opposite of "\" to apache.

Php was loaded successfully.

Therefore, we can avoid having to be confused.

Mysql cannot be found in phpinfo after successful PHP configuration

Many new users may encounter a problem when using Apache + PHP + MySql to configure the PHP environment: mysql cannot be used, and mysql cannot be found in the information obtained by using the phpinfo () function.
Many documents on the Internet say that php. ini should be transferred to the windows or system32 folder! This setting is not required if you add the php and php/ext directories to the environment variables. The reason for this is that Apache will find the configuration file in the default path, and Apache will not find php. ini if no environment variable is set. You can search for php on the phpinfo () page. ini, php. if the ini path is windows, write the PHP path to the environment variable. you can check the environment variable settings online and try not to use php. ini is placed in the system folder. the fewer the system disk operations, the better.
Mysql cannot be found because the mysql runtime library cannot be found. open the mysql installation folder and find libmySQL in the bin folder. dll, copy it to the system32 folder, enable mysql runtime library to be registered in the system, restart Apache, open the phpinfo () page, and search for mysql. The result is as follows:

Congratulations! mysql is running properly in your PHP.
Many new users will be troubled by this problem. I have been plagued by this problem for a long time. all the information on the internet is about copying php. ini to the system disk, but it is still useless. Here, we are very serious about BS people who only copy others' articles without any practical actions. a lot of wrong information is spread by them, misleading many new people and despising them!

Mysql module does not exist in mysql (). The so-called solution is not reliable, such as putting php. ini into C: \ Windows environment variables ..... Even copy ex...

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.