Instructions for adding extension=php_mysqli.dll instructions in php.ini _php tips

Source: Internet
Author: User
Tags unix domain socket
When configuring PHP5 to use MySQL as a database, many people think that as long as the php.ini to add Extension=php_mysql.dll, the instructions can not understand why many articles are recommended to add EXTENSION=PHP_ Mysqli.dll of the order;

Just look at the official latest PHP manual, which says:

The following is a built-in list of extension libraries:

The following modifications are available in PHP 5 (up to 5.0.4). New built-in: DOM,LIBXML,ICONV,SIMPLEXML,SPL and SQLite. The following is no longer built-in: MySQL and overload.

The original PHP5 did not have these extensions built (and, of course, you don't need to add these instructions when using PHP4), as for why PHP5 no longer has a client library that is not bound to MySQL, which is also described in the manual:

Part of the reason is (no specific order):

。 Today, most systems already have client libraries installed.

。 For the above reasons, maintaining multiple versions of the library file can cause confusion. For example, if you connect Mod_auth_mysql to a version, but connect PHP to another version, and then activate them in Apache, you get countless bugs. Also, bound library files do not always work well with server-side versions. The most obvious symptom is where to find the UNIX domain socket file mysql.socket.

。 Maintenance has been somewhat lax and has been lagging increasingly behind the release version.

。 The future version of the library is based on the GPL, so we have no way to upgrade because we cannot bind the GPL based libraries and Bsd/apache style license items together. So having a clean PHP 5 is the best option.

The reason for activating two extensions for PHP at configuration time is because:

。 In order to access the MySQL database server using basic function operations, you must add MySQL support when configuring PHP, that is, to use the Php_mysql.dll extension library.

。 Although the Php_mysql.dll extension library is compatible with the MySQL 4.1.0 machine version, it does not support the additional functionality provided by these versions, and the Php_mysqli.dll extension Library is required to use these features.

PHP 4 (up to PHP 4.3.11): Bcmath,caledar,com,ctype,ftp,mysql,odbc,overload,pcre,session,tokenizer,wddx,xml and Zlib.

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: 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.