Supports compiling php source code for laravel and apache in linux

Source: Internet
Author: User
: This article describes how to compile the php source code of laravel and apache in linux. For more information about PHP tutorials, see. Method:

1) wgethttp: // mirrors.sohu.com/php/php-5.6.9.tar.gz

2) go to the decompressed php source code directory and execute. /configure -- enable-fpm -- enable-mbstring -- with-apxs2 =/usr/local/apache2/bin/apxs -- with-mcrypt -- with-pdo_mysql -- with-openssl -- disable-fileinfo

3) execute make & make install

Note:

1) -- enable-fpm is used to enable php through php-fpm, which can better manage FastCGI than php-cgi. (The latter is easy to automatically fail. pay special attention to the above configurations. if you just add -- enable-fpm to compile a version separately to use php-fpm, this may cause many problems due to inconsistent compilation versions)

2) -- with-apxs2 =/usr/local/apache2/bin/apxs this is related to apache, must be configured, so that the libphp5.so generated by the compilation will be automatically added to the apache side.

3) -- with-mcrypt -- with-pdo_mysql -- with-openssl these are required by laravel

4) -- disable-fileinfo must be added. Otherwise, an error may be reported during compilation: virtual memory exhausted: Cannot allocate memory.

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

The above introduces the support for laravel and apache php source code compilation in linux, including some content, hope to be helpful to friends who are interested in PHP tutorials.

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.