Installing PHP extensions under Linux

Source: Internet
Author: User
Tags phpinfo zts

If you want to correlate pdo_mysql and so on extension, refer to URL:

1, into the PHP package PDO extension Directory (note: Not the PHP installation directory)? 1[[email protected]/]# cd/tmp/lamp/php-5.3.19/ext/pdo_mysql/Note: My PHP package is in/t mp/lamp/php-5.3.19 execute phpize command? 1[[email protected] pdo_mysql]#/usr/local/php/bin/phpize Note:/usr/local/php is my After the PHP installation directory finishes executing the phpize command, the Configure execution configuration copy code code is shown in the Pdo_mysql directory as follows: [[email protected] 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 Specifies the configuration for PHP installation--with-pdo-mysql=/usr/local/mysql/Specify the installation directory location of the MySQL database to compile the installation?1[[email  Protected] pdo_mysql]# made && make install after compiling, note that if a message appears similar to the information shown in the illustration, the compilation installation succeeds, Please pay great attention to the list of red lines (note: The directory name may be different for various time periods). After the compilation installation is complete, the generated 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/ ", load file effects such as: Save Exit Edit! 3. View Phpinfo () First reboot the Apache server. 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!

Installing the Curl Extension

Install the dependency package first: Yum Install Curl Curl-devel Find the installation package for PHP, CD into the installation package CD Php-5.6.25/ext/curlphpize  if the phpize is not found on the completion path,/usr/local/ Php/bin/phpize If the following error occurs: Cannot find autoconf. Please check your autoconf installation and the $PHP _autoconf environment Vari solution: Yum install M4yum install autoconf then re-p Hpize./configure-with-curl=/usr/local/curl-with-php-config=/usr/local/php/bin/php-configmake && Make When install installs successfully, the following content appears: Installing shared extensions:     /usr/local/php/lib/php/extensions/no-debug-zts-20131226/ In this folder, you will see the folder path in the copy to PHP Extension folder can be found in php.ini Extension_dir, the first installation of the extension, this is commented out can be removed comments, and then specify the folder path copied to the folder: CP/ usr/local/php/lib/php/extensions/no-debug-zts-20131226/  /usr/local/php/extension/ back is my Extension folder path modification php.ini: Add restart Apache:/usr/local/apache/bin/apachectl restart
Yum Install Curl Curl-devel

If you have an error, refer to URL

Installing PHP extensions under Linux

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