How to compile PHP5 in Apache 2 statically?

Is it possible to compile php5 (or indeed any version of php) into apache2 binary?

I do not want to install and download php as a general module. What I'm trying to figure out is is it even possible to compile php5 in apache2.

Many thanks!

Rwe

+3
source share
2 answers

I bet you were looking for a way to increase productivity.

The answer is no, you cannot in Apache2.

+1
source

Yes, this is not a problem, first. / configure and build php using:

--with-apache=../path/to/apache-2

then ./configure apache with:

--activate-module=src/modules/php5/libmodphp5.a \

From http://php.net/manual/en/configure.about.php :

--with-apache[=DIR]

Build a static Apache module. DIR is the top-level Apache build
directory, defaults to /usr/local/apache.
-1
source

Source: https://habr.com/ru/post/1728412/


All Articles