When configuring php5, mysql should be used as the database. many people think that if you use php. add the extension = php_mysql.dll; command in ini. I don't understand why extension = php_mysqli.dll is recommended in many articles.
When configuring php5, mysql should be used as the database. many people think that if you use php. add the extension = php_mysql.dll; command in ini. I don't know why many articles recommend that you add the extension = php_mysqli.dll; command.
You only need to check the latest official php Manual, which is written as follows:
The following is a list of built-in extended libraries:
PHP 5 (as of 5.0.4) has the following corrections. Added built-in: DOM, LibXML, Iconv, SimpleXML, SPL, and SQLite. The following are no longer built-in: MySQL and Overload.
Php5 has no built-in extended libraries (of course, you can also conclude that you do not need to add these commands when using php4). as to why php5 does not have a client library that is no longer bound to mysql, it is also clarified in the manual:
This is partly because (there is no specific order ):
. Currently, most systems have installed client libraries.
. For the above reasons, keeping multiple versions of library files will cause confusion. For example, if you connect mod_auth_mysql to a certain version, but connect PHP to another version, and activate them in Apache at the same time, countless errors will be generated. In addition, the bound library file cannot always work well with the server version. The most obvious symptom is where to find the UNIX-domain socket file mysql. socket.
. The protection is a little lax, and the release version is increasingly outdated.
. In the future, the library version is based on GPL, so we have no way to upgrade. because we cannot bind GPL-based libraries with BSD/Apache style permits. Therefore, having a clean PHP 5 is the best choice.
The reason why two extended libraries are activated for php during configuration is:
. In order to be able to use basic functions to access the mysql database server, you must add mysql support when configuring php, that is, expand the database by using php_mysql.dll.
. Although the php_mysql.dll Extension Library is compatible with mysql 4.1.0 and later versions, it does not support the additional functions provided by these versions. to apply these functions, you also need to apply php_mysqli.dll Extension Library.
PHP 4 (as of PHP 4.3.11): BCMath, Caledar, COM, Ctype, FTP, MySQL, ODBC, Overload, PCRE, Session, Tokenizer, WDDX, XML, and Zlib.