Home > Backend Development > PHP Tutorial > Support PHP source code compilation of laravel and apache under linux

Support PHP source code compilation of laravel and apache under linux

WBOY
Release: 2016-08-08 09:19:03
Original
834 people have browsed it

Method:

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

2) Enter the decompressed PHP source code directory, 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

Instructions:

1) --enable-fpm is to start php through php-fpm, so that it can be compared The php-cgi method better manages FastCGI. (The latter is easy to hang up automatically. Pay special attention to the above configurations that must be written once. If you just add --enable-fpm to compile a version just to use php-fpm, it may cause inconsistency in the compiled version. Many questions)

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

3) --with-mcrypt --with-pdo_mysql --with-openssl These are necessary for laravel

4) --disable-fileinfo must be added, otherwise the compilation may report an error: virtual memory exhausted : Cannot allocate memory

Copyright statement: This article is an original article by the blogger and may not be reproduced without the blogger's permission.

The above introduces the PHP source code compilation that supports laravel and apache under Linux, including aspects of the content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template