Linux (CentOS) under PHP extended PDO compiler installation method, centospdo_php tutorial

Source: Internet
Author: User
Tags getting started with php phpinfo nginx server install redis

Linux (CentOS) under PHP extended PDO compiler installation method, Centospdo


This article describes the methods for compiling and installing the PHP extension PDO under Linux (CentOS). Share to everyone for your reference, as follows:

Here is the case of CentOS, the Red Hat series of Linux methods should be the case, the following detailed steps, here seriously despise what content wordy, said assorted about the PDO compiler installation articles.

1, into the PHP package PDO extension Directory (note: Not the PHP installation directory)

[Root@gamejzy/]# cd/tmp/lamp/php-5.3.19/ext/pdo_mysql/

Note: My PHP package is under/tmp/lamp/php-5.3.19

Execute phpize command

[Root@gamejzy pdo_mysql]#/usr/local/php/bin/phpize

Note:/usr/local/php is my PHP installation directory

When you finish executing the phpize command, the Pdo_mysql directory will appear configure

Perform configuration

Copy the Code code as follows: [Root@gamejzy pdo_mysql]#./configure--with-php-config=/usr/local/php/bin/php-config-- with-pdo-mysql=/usr/local/mysql/

Parameter description:

--with-php-config=/usr/local/php/bin/php-config Specify the configuration when PHP is installed
--with-pdo-mysql=/usr/local/mysql/specifying the installation directory location for the MySQL database

Compiling the installation

[Root@gamejzy pdo_mysql]# make && make install

When the compilation is complete, notice that the information similar to that shown in the slice appears

If it appears that the compilation installation was successful, pay great attention to the directory where the red line is circled (Note: The directory name may be different for various time periods).

After the compilation installation is complete, the generated pdo_mysql.so file is placed in this directory.

2. Modify the php.ini file

Use VI to open your machine's php.ini file, add a piece of code "extension=/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/pdo_mysql.so" , load pdo_mysql.so file

Effects such as:

Save Exit Edit!

3. View Phpinfo ()

Restart the Apache server first. Use the Phpinfo () function to view the installation information for PHP, as shown in the description of the PDO extension installation success.

This is the end!

More readers interested in PHP related content can view the topic: "PHP Curl Usage Summary", "PHP operation and operator Usage Summary", "PHP Network Programming Skills Summary", "PHP Basic Grammar Introductory Tutorial", "PHP operation Office Document tips summary (including word, excel,access,ppt), "PHP Date and Time usage summary", "PHP primer for Object-oriented programming", "PHP String Usage Summary", "Getting Started with Php+mysql database operations" and "PHP Common Database Operations Skills Summary"

I hope this article is helpful to you in PHP programming.

Articles you may be interested in:

    • Installation and deployment of Redis under Linux
    • Install Redis and set up related services under Linux
    • Description of the Redis process and configuration parameters installed under the CentOS Linux system
    • How to add a iconv module to PHP under Linux
    • PHP performs common functions for Linux commands summary
    • Linux installation methods for configuring the PHP environment
    • Installation of multi-version PHP coexistence with Nginx server using Linux system
    • Installation and configuration tutorial for PHP-FPM under Linux system
    • Methods for compiling Redis and Phpredis under Linux

http://www.bkjia.com/PHPjc/1119998.html www.bkjia.com true http://www.bkjia.com/PHPjc/1119998.html techarticle Linux (CentOS) under the PHP extension PDO compiler installation method, Centospdo This article describes the Linux (CentOS) extended PDO compiler installation method. Share to everyone for your reference, as follows: here ...

  • 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.