Linux PHP extensions pdo_mysql compile installation tutorial

Source: Internet
Author: User

The PHP extensions under Linux are somewhat different from the extensions installed under Windows. The following is the extension of PHP under Linux pdo,pdo_mysql module to illustrate

1. In the PHP original code installation package, into the etc/pdo_mysql. Let's say your PHP is installed in the/usr/local/php. Execute/usr/local/php/bin/phpize

2. To compile .../configure--with-php-config=/usr/local/php/bin/php-config--with-pdo-mysql=/usr/local/mysql ( Suppose your MySQL is installed in/usr/local/mysql)

3. Compile and install. Make,make install.

4. By the 3rd step. In the/usr/local/php/lib/php/extensions, there will be a no-debug-non-zts-20050922 folder, which generates a pdo_mysql.so

5. Modify php.ini, add extension statement extension= "/usr/local/php/lib/php/extensions/no-debug-non-zts-20050922/pdo_mysql.so"

6. Restart Apache. OK extension complete

7. The method of installing PDO is the same as that of Pdo_mysql. But be aware that if the system does not have a aclocal command during this installation, then install the command, which is in the autoconf package.

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.