phpday 2025 - Call For Papers

Installation on Unix systems

Tabla de contenidos

Most Unix (and Linux) operating systems and distributions have a packaged version of PHP and extensions available through their packaging system. There are sections with basic information on installing PHP using those systems.

For some distributions, there are also third-party repositories of packages that generally include a wider variety of available versions and extensions.

PHP can also be installed as a component of some third-party application servers .

Finally, PHP can always be installed from the source distributions, which allows the greatest flexibility in choosing what features, extensions, and server APIs to enable. There are sections with information about compiling and configuring PHP to use with different server APIs in particular.

add a note

User Contributed Notes 1 note

up
25
cj3 at clifjackson dot net
6 years ago
I recently ran in to a situation where I was building PHP 7.1.13 from source. Configuration & make went fine, however, when I ran make install it hung. It turns out that if you are building PHP with Apache (apxs) the make file calls apxs with the -a flag which tells it to modify the httpd.conf file. If, for whatever reason, the file is not writeable then it fails and you get the hang.

Line 108 in my Makefile looks like this:

INSTALL_IT = $(mkinstalldirs) '$(INSTALL_ROOT)/usr/lib64/httpd/modules' && $(mkinstalldirs) '$(INSTALL_ROOT)/etc/httpd/conf' && /usr/sbin/apxs -S LIBEXECDIR='$(INSTALL_ROOT)/usr/lib64/httpd/modules' -S SYSCONFDIR='$(INSTALL_ROOT)/etc/httpd/conf' -i -a -n php7 libphp7.la

I had to remove the -a flag and then it was fine.
To Top