extension_dir Instructions on adding extension=php_mysqlidll directive in phpini

WBOY
Release: 2016-07-29 08:37:02
Original
1125 people have browsed it

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:
There are the following changes in PHP 5 (as of 5.0.4). 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, the manual also explains:
Part of the reason is ( 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 way to upgrade since we cannot 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.

The above introduces the extension_dir instructions on adding the extension=php_mysqlidll instruction in phpini, including the content of extension_dir. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!