How to solve the "unable to load mysql extension" problem that may be encountered during PHP installation

Source: Internet
Author: User

When accessing phpmyadmin, "mysql extension cannot be loaded. Check the PHP configuration ". Check that "php_mysql.dll" cannot be loaded.
For php 4.x users, follow discuz! 4.0 the user manual description in the program can be done in general. The most common cause is php 5.x.
I encountered this problem when setting up the environment. I want to check the solution from this forum. I found that there are still many people who have encountered this problem.
Since it was just the beginning of the php program, all the programs have downloaded the latest version. For laruence, it may be a habit to use earlier versions and do not like to use the latest version, therefore, it is difficult to find a solution in the forum, so we will leave it to our new users to find their answers.

The problem was solved at two points and shared with you. There is not much gossip. The following is my final solution. I hope it will help my friends who have encountered the same problem.

My php version: php-5.1.1-Win32

Follow the downloaded discuz! 4.0 user manual configuration environment.
The red part is a change relative to the manual description:
1. For php. ini files
Go to C: \ PHP and set php. copy ini-dist to C: \ WINNT (C: \ Windows in Windows XP/2003) and change it to php. ini, open it in notepad, and use the search function of notepad to search extension_dir = ". /", and direct the path to the extensions directory under your PHP Directory, for example, extension_dir =" C: \ PHP \ ext "; then search register_globals = Off, change Off to On;
Search; extension = php_mysql.dll, remove the quotation mark.
2. In the manual, change "PHP \ sapi \ php4isapi. dll" to "php5isapi. dll" in the php Directory"
3. Important: copy the dll file under the php Directory and ext (php4x is extension in the manual, which should be ext) to system32, copy libmysql in the php Directory. dll file to system32.

Restart IIS:
Run the following commands one by one at the command prompt:
Net stop w3svc
Net stop iisadmin
Net start w3svc

Check whether the problem is solved.

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.