Installation of several modules in PHP

Source: Internet
Author: User
Tags php mysql php mysql extension php source code zts

1. php mysql extension pdo_mysql (in the directory where PHP source code is located)

        1.1  into the PHP package PDO extension Directory   cd /usr/local/services/php-5.6.5/ext/pdo _mysql/
        1.2  execute phpize command, generate configure file  /usr/local/php/bin/phpize 
& nbsp       1.3 performing configuration  ./configure --with-php-config=/usr/local/php/bin/php-config -- with-pdo-mysql=/usr/local/mysql/
          where--with-pdo-mysql=/usr/local/mysql/specifies MySQL The installation directory location of the database
        here if MySQL is manually installed should not have any problem, because my system has been automatically installed on the MySQL, the result is constantly, it is recommended to manually install MySQL
        Solutions:
        A, automatically installed MySQL-related files are generally scattered in the various subdirectories of/usr, At this point the--with-pdo-mysql should be specified directly as/usr/, i.e.--with-pdo-mysql=/usr/
        B, make error
        
        This is because the MySQL header file is required at compile time, and the default search path does not find the location of the head file, so this problem occurs, so the/usr/include/ The MySQL header file in the mysql/directory is linked to the        /usr/local/include/directory, which is:

      ln-s  /usr/include/mysql/*   /usr/local/include/ 
      This will be OK, continue make,make install
      1.4  The generated pdo_mysql.so file is placed in this directory after the installation is complete  /usr/local/ php/lib/php/extensions/no-debug-non-zts-20131226, modify php config file php.ini
      extension=/usr/ Local/php/lib/php/extensions/no-debug-non-zts-20131226/pdo_mysql.so

2. Curl Installation
2.1 TAR-ZXVF curl-7.19.6.tar.gz
CD curl-7.19.6
./configure--prefix=/usr/local/curl
Make
Make install
2.2 into the Linux PHP source directory in the Ext directory, where the source code for each extension module, select the module you need, such as the Curl module: CD curl execution phpize generate compiled files, phpize in the PHP installation directory of the bin directory:
/usr/local/php5/bin/phpize
./configure--with-curl=/usr/local/curl--with-php-config=/usr/local/php5/bin/php-config
Make
Make install
In this way, the curl.so is copied to the PHP directory (/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226), and then the PHP configuration file needs to be modified php.ini

Installation of several modules in PHP

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.