Correct settings for PHP access to mysql4.1 and above

Source: Internet
Author: User
Finally, access to databases above mysql4.1 through phpMyAdmin in PhP5 is implemented.
Before that, when phpMyAdmin is used for access, the system always prompts that MySQL extension cannot be loaded. A number of materials collected from the Internet have not been resolved according to their methods. Then run phpinfo. php In the phpMyAdmin directory and find that extension_dir is always C:/PhP5. I guess the information of the php. ini file is not read at all. So I thought of setting phpinidir D:/PHP/in Apache HTTP. conf /. So I guess Apache will use this directory to read the configuration file. Put PHP. I copied the INI file to the PHP installation directory D:/PHP. When I restarted Apache, I couldn't find the extension. It was obviously a problem with the extension_dir settings. I changed it to D:/PHP/EXT /, restart Apache and access phpMyAdmin. The interface appears for a long time. Ecstasy.
In addition, you need to modify the config. inc. in the PHP file, modify $ cfg ['servers'] [$ I] ['extension'] To 'mysqli', that is, use mysqli extension instead of MySQL extension. For MySQL 4.1.3 and later versions, mysqli extension provides better performance than MySQL extension.
Do not forget to copy libmysql. DLL to the % System % directory. In addition, I also set Path = D:/PHP; D:/PHP/EXT; % PATH %. I don't know if D:/PHP/EXT does not work. Using phpinidir does not require placing PHP. ini in the Windows directory.

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.