[opensuse-factory] php7-fpm setup does not work anymore
Since last TW snapshot 20200301**my apache2/php7-fpm setup does not work anymore. My /etc/apache2/conf.d/php7-fpm.conf: <FilesMatch \.php$> <If "-f %{REQUEST_FILENAME}"> SetHandler "proxy:unix:/var/run/php-fpm-www.sock|fcgi://localhost/" </If> </FilesMatch> DirectoryIndex index.php index.html index.htm SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1 My /srv/www/htdocs/phpinfo.php <?php phpinfo(); ?> # ls -l /var/run/php-fpm-www.sock srw-rw---- 1 wwwrun www 0 Mar 4 10:23 /var/run/php-fpm-www.sock Apache shows the following error ==> /var/log/apache2/error_log <== [Wed Mar 04 11:14:37.097340 2020] [proxy:warn] [pid 17366:tid 139652128270080] [client 127.0.0.1:41280] AH00917: connect to remote machine localhost blocked: IP 0.0.0.0 matched [Wed Mar 04 11:14:37.097378 2020] [proxy:error] [pid 17366:tid 139652128270080] [client 127.0.0.1:41280] AH00898: Connect to remote machine blocked returned by /phpinfo.php ==> /var/log/apache2/access_log <== 127.0.0.1 - - [04/Mar/2020:11:14:37 +0100] "GET /phpinfo.php HTTP/1.1" 403 1079 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:73.0) Gecko/20100101 Firefox/73.0" PHP7-FPM shows ==> /var/log/php-fpm.log [04-Mar-2020 11:20:26] NOTICE: fpm is running, pid 19836 [04-Mar-2020 11:20:26] NOTICE: ready to handle connections [04-Mar-2020 11:20:26] NOTICE: systemd monitor interval set to 10000ms Any ideas? Greetings, Björn -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Bjoern Voigt wrote:
Since last TW snapshot 20200301**my apache2/php7-fpm setup does not work anymore. I found a solution. During "zypper dup" mod_php7 was automatically activated by postinstall script of apache2-mod_php7. The solution:
# a2dismod php7 # systemctl restart apache2 or # zypper rm apache2-mod_php7 Greetings, Björn -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Citeren Bjoern Voigt <bjoernv@arcor.de>:
Bjoern Voigt wrote:
Since last TW snapshot 20200301**my apache2/php7-fpm setup does not work anymore. I found a solution. During "zypper dup" mod_php7 was automatically activated by postinstall script of apache2-mod_php7. The solution:
# a2dismod php7 # systemctl restart apache2
or
# zypper rm apache2-mod_php7
You may want to add # zypper al apache2-mod_php7 This will prevent accidentally installing and enabling it again. I've seen similar breakage in the past too, where the 'event' MPM failed to start because mod_php was enabled in a %post script.
Greetings, Björn
-- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Arjen de Korte wrote:
You may want to add
# zypper al apache2-mod_php7
This will prevent accidentally installing and enabling it again. I've seen similar breakage in the past too, where the 'event' MPM failed to start because mod_php was enabled in a %post script. Thanks, but this breaks the PHP7 updates and I have to install them manually with
# zypper in --download-only apache2-mod_php7; rpm --justdb -Uvh /var/cache/zypp/packages/repo-oss/x86_64/apache2-mod_php7-7.4.3-1.1.x86_64.rpm --nodeps" (example) My "zypper dup" command line also solves the problem: # zypper ref; zypper dup; a2dismod php7 In my case the Nextcloud server has a dependency to mod_php7 but in fact Nextcloud works with PHP-FPM too: # rpm -qR nextcloud | grep mod_php mod_php_any >= 7.2.0 mod_php_any < 7.5.0 Greetings, Björn -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Citeren Bjoern Voigt <bjoernv@arcor.de>:
Arjen de Korte wrote:
You may want to add
# zypper al apache2-mod_php7
This will prevent accidentally installing and enabling it again. I've seen similar breakage in the past too, where the 'event' MPM failed to start because mod_php was enabled in a %post script. Thanks, but this breaks the PHP7 updates and I have to install them manually with
# zypper in --download-only apache2-mod_php7; rpm --justdb -Uvh /var/cache/zypp/packages/repo-oss/x86_64/apache2-mod_php7-7.4.3-1.1.x86_64.rpm --nodeps" (example)
My "zypper dup" command line also solves the problem:
# zypper ref; zypper dup; a2dismod php7
In my case the Nextcloud server has a dependency to mod_php7 but in fact Nextcloud works with PHP-FPM too:
# rpm -qR nextcloud | grep mod_php mod_php_any >= 7.2.0 mod_php_any < 7.5.0
The 'mod_php_any' dependency is a nasty one. Ideally the 'php7-fpm' package should also provide 'mod_php_any' and conflict with 'apache2-mod_php7' to prevent this situation from happening in the first place. I'm not sure why we don't have this already, but it probably has to do with the fact that 'php7-fpm' will not provide a working solution out of the box while 'apache2-mod_php7' does. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On 3/5/20 11:34 AM, Arjen de Korte wrote:
The 'mod_php_any' dependency is a nasty one. Ideally the 'php7-fpm' package should also provide 'mod_php_any' and conflict with 'apache2-mod_php7' to prevent this situation from happening in the first place. I'm not sure why we don't have this already, but it probably has to do with the fact that 'php7-fpm' will not provide a working solution out of the box while 'apache2-mod_php7' does.
You cannot solve this at package dependency level because in theory on a single web server both solutions could be used for different PHP applications. I think the real culprit is the overzealous pseudo config management done in some postinst scripts. Ciao, Michael. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On 3/5/20 4:34 AM, Arjen de Korte wrote:
The 'mod_php_any' dependency is a nasty one. Ideally the 'php7-fpm' package should also provide 'mod_php_any' and conflict with 'apache2-mod_php7' to prevent this situation from happening in the first place. I'm not sure why we don't have this already, but it probably has to do with the fact that 'php7-fpm' will not provide a working solution out of the box while 'apache2-mod_php7' does.
As a php user, i would prefer (and expected) that a package like nextcloud only has dependencies for the php modules it actually uses in its code; not modules that php needs to "connect" to a given web server, or any other particular use case. How to connect php to a web server is a job for the wiki, imho. People could be just writing cli scripts and not even want a web server, much less apache deps. BTW, why does nginx use the 'nginx' user and group, instead of 'wwwrun' and 'www'? Thanks, ITwrx -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Wed, 04 Mar 2020, 12:58:12 +0100, Bjoern Voigt wrote:
Bjoern Voigt wrote:
Since last TW snapshot 20200301**my apache2/php7-fpm setup does not work anymore. I found a solution. During "zypper dup" mod_php7 was automatically activated by postinstall script of apache2-mod_php7. The solution:
# a2dismod php7 # systemctl restart apache2
or
# zypper rm apache2-mod_php7
To be honest, this does not look right to me. A package should not change a working configuration under the hood by running some post-script. This sounds similar to the changes from installing the nss-mdns package... Just because I install a package does not necessarily mean I'm going to use it now. I'd create a bug report.
Greetings, Björn
Cheers. l8er manfred
On Thu, Mar 05, 2020 at 11:49:30AM +0100, Manfred Hollstein wrote:
On Wed, 04 Mar 2020, 12:58:12 +0100, Bjoern Voigt wrote: To be honest, this does not look right to me. A package should not change a working configuration under the hood by running some post-script. This sounds similar to the changes from installing the nss-mdns package... Just because I install a package does not necessarily mean I'm going to use it now. I'd create a bug report.
I tend to agree. Petr -- Have a lot of fun! -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
participants (6)
-
Arjen de Korte
-
Bjoern Voigt
-
ITwrx
-
Manfred Hollstein
-
Michael Ströder
-
pgajdos