Lamp installation note of the source code to install PHP

Source: Internet
Author: User
Tags php source code

    1. Download PHP Source: http://php.net/downloads.php (currently the latest version 5.6.7)
    2. TAR-XF Php-xx.tar
    3. CD PHP-XX
    4. ./configure--with-apxs2=/usr/local/apache2/bin/apxs--with-mysql

See all configurable options: 1. Run the autoconf command after running the PHP source code directory./configure--help

2. See GNU Configure:http://www.airs.com/ian/configure/

5. Make

6. Make Install

7. CP php.ini FILE: CP Php.ini-development/usr/local/bin/php.ini

8. Edit the httpd.conf file to make sure the Loadmodules php5_module modules/libphp5.so available

9. Tell Apache to parse the file for a specific extension into PHP. For example, Add. php:

Added in httpd.conf: <filesmatch \.php$>

SetHandler application/x-httpd-php

</FilesMatch>

10. Restart Apache:service httpd-k restart or/usr/local/apache2/bin/apachectl-k restart

Reference Document: PHP Official document Http://php.net/manual/zh/install.unix.apache2.php

Lamp installation note of the source code to install 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.