Home  >  Article  >  Backend Development  >  Instructions on adding extension=php_mysqli.dll directive in php.ini_PHP Tutorial

Instructions on adding extension=php_mysqli.dll directive in php.ini_PHP Tutorial

WBOY
WBOYOriginal
2016-07-21 15:55:241151browse

When configuring php5, use mysql as the database. Many people think that just adding the extension=php_mysql.dll; command to php.ini is enough. I don’t know why many articles recommend adding the extension=php_mysqli.dll; command.

Just check the latest official PHP manual, it says:

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

PHP 5 (as of 5.0.4) has Modifications below. New built-ins: DOM, LibXML, Iconv, SimpleXML, SPL and SQLite. The following are no longer built-in: MySQL and Overload.

It turns out that php5 does not have these extension libraries built in (of course, it can be concluded that when using php4, there is no need to add these instructions). As for why php5 does not no longer bind the client library of mysql, it is also explained in the manual:

Some of the reasons are (in no particular order):

. Most systems today have client libraries installed.

. For the above reasons, maintaining multiple versions of library files can lead to confusion. For example, if you connect mod_auth_mysql to one version, but PHP to another version, and then activate them both in Apache, you will get numerous errors. Additionally, bundled libraries don't always play well with server-side versions. The most obvious symptom of this is where to find the UNIX domain socket file mysql.socket.

. Maintenance is somewhat lax and it has fallen further and further behind released versions.

. Future versions of the library are GPL-based, so we have no upgrade path because we can't tie a GPL-based library to a project with a BSD/Apache-style license. So having a clean PHP 5 is the best option.

The reason why two extension libraries are activated for php during configuration is because:

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

. Although the php_mysql.dll extension library is compatible with mysql 4.1.0 and later machine versions, it does not support the additional functions provided by these versions. To use these functions, you also need to use the php_mysqli.dll extension library.

In PHP 4 (as of PHP 4.3.11): BCMath, Caledar, COM, Ctype, FTP, MySQL, ODBC, Overload, PCRE, Session, Tokenizer, WDDX, XML and Zlib.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/318285.htmlTechArticleTo use mysql as the database when configuring php5, many people think that just add extension=php_mysql in php.ini .dll; command is enough. I don’t know why many articles recommend adding it...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn