From c8904bda19f1c226eebd87cc49ebb347312742b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Fri, 4 Aug 2017 20:10:53 +0200 Subject: [PATCH 1/2] Make sentence forward compatible We are not going to maintain documentation for all possible versions of php. --- setup/web_server_configuration.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/web_server_configuration.rst b/setup/web_server_configuration.rst index c3b4cf32b18..2bd997d169b 100644 --- a/setup/web_server_configuration.rst +++ b/setup/web_server_configuration.rst @@ -135,7 +135,7 @@ For advanced Apache configuration options, read the official `Apache documentati Apache with PHP-FPM ------------------- -To make use of PHP5-FPM with Apache, you first have to ensure that you have +To make use of PHP-FPM with Apache, you first have to ensure that you have the FastCGI process manager ``php-fpm`` binary and Apache's FastCGI module installed (for example, on a Debian based system you have to install the ``libapache2-mod-fastcgi`` and ``php5-fpm`` packages). From 63cf716ce56c99cefae0adb103279b4afc55a257 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Fri, 4 Aug 2017 20:11:42 +0200 Subject: [PATCH 2/2] Assume most users start new projects with php 7.1 I have no numbers to back that up, but I think it is easy and worth it upgrading to 7.1 even if 7.0 is the default for your system, especially in the docker era. --- setup/web_server_configuration.rst | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/setup/web_server_configuration.rst b/setup/web_server_configuration.rst index 2bd997d169b..9a0b439aa07 100644 --- a/setup/web_server_configuration.rst +++ b/setup/web_server_configuration.rst @@ -138,7 +138,7 @@ Apache with PHP-FPM To make use of PHP-FPM with Apache, you first have to ensure that you have the FastCGI process manager ``php-fpm`` binary and Apache's FastCGI module installed (for example, on a Debian based system you have to install the -``libapache2-mod-fastcgi`` and ``php5-fpm`` packages). +``libapache2-mod-fastcgi`` and ``php7.1-fpm`` packages). PHP-FPM uses so-called *pools* to handle incoming FastCGI requests. You can configure an arbitrary number of pools in the FPM configuration. In a pool @@ -153,7 +153,7 @@ listen on. Each pool can also be run under a different UID and GID: group = www-data ; use a unix domain socket - listen = /var/run/php5-fpm.sock + listen = /var/run/php7.1-fpm.sock ; or listen on a TCP socket listen = 127.0.0.1:9000 @@ -223,10 +223,10 @@ should look something like this: ServerName domain.tld ServerAlias www.domain.tld - AddHandler php5-fcgi .php - Action php5-fcgi /php5-fcgi - Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi - FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -pass-header Authorization + AddHandler php7-fcgi .php + Action php7-fcgi /php7-fcgi + Alias /php7-fcgi /usr/lib/cgi-bin/php7-fcgi + FastCgiExternalServer /usr/lib/cgi-bin/php7-fcgi -host 127.0.0.1:9000 -pass-header Authorization DocumentRoot /var/www/project/web @@ -251,7 +251,7 @@ instead: .. code-block:: apache - FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket /var/run/php5-fpm.sock -pass-header Authorization + FastCgiExternalServer /usr/lib/cgi-bin/php7-fcgi -socket /var/run/php7.1-fpm.sock -pass-header Authorization .. _web-server-nginx: @@ -274,7 +274,7 @@ The **minimum configuration** to get your application running under Nginx is: # This rule should only be placed on your development environment # In production, don't include this and don't deploy app_dev.php or config.php location ~ ^/(app_dev|config)\.php(/|$) { - fastcgi_pass unix:/var/run/php5-fpm.sock; + fastcgi_pass unix:/var/run/php7.1-fpm.sock; fastcgi_split_path_info ^(.+\.php)(/.*)$; include fastcgi_params; # When you are using symlinks to link the document root to the @@ -289,7 +289,7 @@ The **minimum configuration** to get your application running under Nginx is: } # PROD location ~ ^/app\.php(/|$) { - fastcgi_pass unix:/var/run/php5-fpm.sock; + fastcgi_pass unix:/var/run/php7.1-fpm.sock; fastcgi_split_path_info ^(.+\.php)(/.*)$; include fastcgi_params; # When you are using symlinks to link the document root to the