Centos linux PHP extension installation steps

Source: Internet
Author: User


Use the Phpinfo () function to output PHP information and locate the configuration File (php.ini)

Apachectl's design intent is to help administrators control the functionality of the Apache httpd daemon.

Centos linux PHP extension installation steps
1 first into the PHP source package
Cd/opt/php-5.1.2/ext/zlib
2 Generate configure files under the Zlib folder (PHP installation directory/opt/php/)
/opt/php/bin/phpize
3 Configuration Compilation
./configure--with-php-config=/opt/php/bin/php-config--with-zlib
Make && make install
4 Generate a zlib.so file under/opt/php/lib/php/extensions
5 Determine extension_dir=/opt/php/lib/php/extensions and extension=zlib.so in the php.ini file
6 Recompile PHP
Install the GD Library extension.
My PHP is unzipped in/home/web/php-5.4/
Can go directly to this directory
cd/home/web/php-5.4/
And then reconfigure PHP, configuration is to retain the original configuration based on the new GD library,

The original configuration may be installed by many people forget, it's okay, this can be seen in the Configure Command of Phpinfo ()
'./configure '--prefix=/home/web/php-5.4/'--with-apxs2=/home/web/apache/bin/apxs '--with-mysql=/usr '-- with-config-file-path=/home/web/php-5.4/'--enable-mbstring '
Change to Linux command
./configure--prefix=/home/web/php-5.4/--with-apxs2=/home/web/apache/bin/apxs--with-mysql=/usr-- with-config-file-path=/home/web/php-5.4/--enable-mbstring--WITH-GD--with-curl
If configure executes successfully, you can see thank for using PHP.

Perform
Make
Make install

Reboot Apache complete.

Centos linux PHP extension installation steps

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.