Nginx-php and mysql extension Libraries

Source: Internet
Author: User
To use the mysql_connect () function in php, You need to enable the php_mysql library. However, when compiling php, you are puzzled by the following parameters: -- with-mysqlmysql Client Connection Library -- with-mysqlimysql Client Connection Library -- with-pdo-mysqlmysql Client Connection Library "--... use in php mysql_connect()Function, You need to enable php_mysqlLibrary,

However, when compiling php, it is hard to understand the following parameters:

  • -- With-mysql = mysql client Connection Library
  • -- With-mysqli = mysql client Connection Library
  • -- With-pdo-mysql = mysql client Connection Library

"-- With-mysql = mysql client Connection Library" Why do you need to write this? The php_mysql database,php_mysqliIs the library provided by PHP or generated by the mysql client Connection Library?

Reply content:

Use in phpmysql_connect()Function, You need to enablephp_mysqlLibrary,

However, when compiling php, it is hard to understand the following parameters:

  • -- With-mysql = mysql client Connection Library
  • -- With-mysqli = mysql client Connection Library
  • -- With-pdo-mysql = mysql client Connection Library

"-- With-mysql = mysql client Connection Library" Why do you need to write this? The php_mysql database,php_mysqliIs the library provided by PHP or generated by the mysql client Connection Library?

The mysql/mysqli library in php is a simple encapsulation of MySQL's c api and does not contain the implementation of c api. It depends on libmysqlclient. so and related header files, so they need to be in the path during compilation.

-- With-mysql = [path] The path here is the path specified by -- prefix when mysql is compiled. It should contain the include and lib directories, which will contain the above files.

The MySQL client library is used to connect to the MySQL server. The MySQL extension library of PHP enables PHP to call the MySQL client library.

Libraries are used for linking, not for generating other libraries.

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.