Bug 26548 - php-fpm apache configuration loaded too soon
Summary: php-fpm apache configuration loaded too soon
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 7
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA7-64-OK
Keywords: advisory, validated_update
Depends on:
Blocks:
 
Reported: 2020-04-27 19:54 CEST by Renaud Michel
Modified: 2020-07-06 22:43 CEST (History)
5 users (show)

See Also:
Source RPM: php-7.3.18-1.mga7.src.rpm
CVE:
Status comment:


Attachments

Description Renaud Michel 2020-04-27 19:54:42 CEST
In the php-fpm package, the apache configuration file is named 00-php-fpm.conf, which means it is actually loaded before the proxy configuration, and all the fpm configuration is ignored due to the IdModule block.
(this was already reported in #25024, but the loading order was not properly fixed then)

This was actrually fixed in cauldron a few weeks ago:
http://svnweb.mageia.org/packages?view=revision&revision=1558713
could this fix be backported to mageia 7?


Also, the 00-php-fpm.conf is also present in the apache-mod_php package, which is probably a mistake.
This is still the case in cauldron (with apache-mod_php-7.4.5-1.mga8), with the file renamed to 10-php-fpm.conf
I think the mistake here is with this line in the spec file for the files sections of apache-mod_php:
%config(noreplace) %{_httpd_modconfdir}/*.conf
Comment 1 Lewis Smith 2020-06-18 20:47:39 CEST
Sorry this slipped by for so long. Thank you for the helpful report.
> This was actrually fixed in cauldron a few weeks ago:
/cauldron/php/current/SPECS/php.spec
 Sat Mar 21 2020
 change order of config as php-fpm must be loaded after mod_prox

Both php-fpm & apache-mod_php are in the PHP SRPM.
Assigning to Marc for PHP, CC'ing Joseph who did the Cauldron fix.

Assignee: bugsquad => mageia
Source RPM: php => php-7.3.18-1.mga7.src.rpm
CC: (none) => joequant

Comment 2 Marc Krämer 2020-06-19 12:31:27 CEST
Updated php package:

- Fixing load of apache-php-fpm conf in wrong order
Updating to the latest release 7.3.19
- Fixing some php-opcache issues
- Fixing float -> int conversion in MySQLnd

References:
https://www.php.net/ChangeLog-7.php#7.3.19
========================

Updated packages in core/updates_testing:
========================
php-ini-7.3.19-2.mga7
apache-mod_php-7.3.19-2.mga7
php-cli-7.3.19-2.mga7
php-cgi-7.3.19-2.mga7
lib64php_common7-7.3.19-2.mga7
php-devel-7.3.19-2.mga7
php-openssl-7.3.19-2.mga7
php-zlib-7.3.19-2.mga7
php-doc-7.3.19-2.mga7
php-bcmath-7.3.19-2.mga7
php-bz2-7.3.19-2.mga7
php-calendar-7.3.19-2.mga7
php-ctype-7.3.19-2.mga7
php-curl-7.3.19-2.mga7
php-dba-7.3.19-2.mga7
php-dom-7.3.19-2.mga7
php-enchant-7.3.19-2.mga7
php-exif-7.3.19-2.mga7
php-fileinfo-7.3.19-2.mga7
php-filter-7.3.19-2.mga7
php-ftp-7.3.19-2.mga7
php-gd-7.3.19-2.mga7
php-gettext-7.3.19-2.mga7
php-gmp-7.3.19-2.mga7
php-hash-7.3.19-2.mga7
php-iconv-7.3.19-2.mga7
php-imap-7.3.19-2.mga7
php-interbase-7.3.19-2.mga7
php-intl-7.3.19-2.mga7
php-json-7.3.19-2.mga7
php-ldap-7.3.19-2.mga7
php-mbstring-7.3.19-2.mga7
php-mysqli-7.3.19-2.mga7
php-mysqlnd-7.3.19-2.mga7
php-odbc-7.3.19-2.mga7
php-opcache-7.3.19-2.mga7
php-pcntl-7.3.19-2.mga7
php-pdo-7.3.19-2.mga7
php-pdo_dblib-7.3.19-2.mga7
php-pdo_firebird-7.3.19-2.mga7
php-pdo_mysql-7.3.19-2.mga7
php-pdo_odbc-7.3.19-2.mga7
php-pdo_pgsql-7.3.19-2.mga7
php-pdo_sqlite-7.3.19-2.mga7
php-pgsql-7.3.19-2.mga7
php-phar-7.3.19-2.mga7
php-posix-7.3.19-2.mga7
php-readline-7.3.19-2.mga7
php-recode-7.3.19-2.mga7
php-session-7.3.19-2.mga7
php-shmop-7.3.19-2.mga7
php-snmp-7.3.19-2.mga7
php-soap-7.3.19-2.mga7
php-sockets-7.3.19-2.mga7
php-sodium-7.3.19-2.mga7
php-sqlite3-7.3.19-2.mga7
php-sysvmsg-7.3.19-2.mga7
php-sysvsem-7.3.19-2.mga7
php-sysvshm-7.3.19-2.mga7
php-tidy-7.3.19-2.mga7
php-tokenizer-7.3.19-2.mga7
php-xml-7.3.19-2.mga7
php-xmlreader-7.3.19-2.mga7
php-xmlrpc-7.3.19-2.mga7
php-xmlwriter-7.3.19-2.mga7
php-xsl-7.3.19-2.mga7
php-wddx-7.3.19-2.mga7
php-zip-7.3.19-2.mga7
php-fpm-7.3.19-2.mga7
phpdbg-7.3.19-2.mga7
php-debugsource-7.3.19-2.mga7
php-debuginfo-7.3.19-2.mga7
apache-mod_php-debuginfo-7.3.19-2.mga7
php-cli-debuginfo-7.3.19-2.mga7
php-cgi-debuginfo-7.3.19-2.mga7
lib64php_common7-debuginfo-7.3.19-2.mga7
php-openssl-debuginfo-7.3.19-2.mga7
php-zlib-debuginfo-7.3.19-2.mga7
php-bcmath-debuginfo-7.3.19-2.mga7
php-bz2-debuginfo-7.3.19-2.mga7
php-calendar-debuginfo-7.3.19-2.mga7
php-ctype-debuginfo-7.3.19-2.mga7
php-curl-debuginfo-7.3.19-2.mga7
php-dba-debuginfo-7.3.19-2.mga7
php-dom-debuginfo-7.3.19-2.mga7
php-enchant-debuginfo-7.3.19-2.mga7
php-exif-debuginfo-7.3.19-2.mga7
php-fileinfo-debuginfo-7.3.19-2.mga7
php-filter-debuginfo-7.3.19-2.mga7
php-ftp-debuginfo-7.3.19-2.mga7
php-gd-debuginfo-7.3.19-2.mga7
php-gettext-debuginfo-7.3.19-2.mga7
php-gmp-debuginfo-7.3.19-2.mga7
php-hash-debuginfo-7.3.19-2.mga7
php-iconv-debuginfo-7.3.19-2.mga7
php-imap-debuginfo-7.3.19-2.mga7
php-interbase-debuginfo-7.3.19-2.mga7
php-intl-debuginfo-7.3.19-2.mga7
php-json-debuginfo-7.3.19-2.mga7
php-ldap-debuginfo-7.3.19-2.mga7
php-mbstring-debuginfo-7.3.19-2.mga7
php-mysqli-debuginfo-7.3.19-2.mga7
php-mysqlnd-debuginfo-7.3.19-2.mga7
php-odbc-debuginfo-7.3.19-2.mga7
php-opcache-debuginfo-7.3.19-2.mga7
php-pcntl-debuginfo-7.3.19-2.mga7
php-pdo-debuginfo-7.3.19-2.mga7
php-pdo_dblib-debuginfo-7.3.19-2.mga7
php-pdo_firebird-debuginfo-7.3.19-2.mga7
php-pdo_mysql-debuginfo-7.3.19-2.mga7
php-pdo_odbc-debuginfo-7.3.19-2.mga7
php-pdo_pgsql-debuginfo-7.3.19-2.mga7
php-pdo_sqlite-debuginfo-7.3.19-2.mga7
php-pgsql-debuginfo-7.3.19-2.mga7
php-phar-debuginfo-7.3.19-2.mga7
php-posix-debuginfo-7.3.19-2.mga7
php-readline-debuginfo-7.3.19-2.mga7
php-recode-debuginfo-7.3.19-2.mga7
php-session-debuginfo-7.3.19-2.mga7
php-shmop-debuginfo-7.3.19-2.mga7
php-snmp-debuginfo-7.3.19-2.mga7
php-soap-debuginfo-7.3.19-2.mga7
php-sockets-debuginfo-7.3.19-2.mga7
php-sodium-debuginfo-7.3.19-2.mga7
php-sqlite3-debuginfo-7.3.19-2.mga7
php-sysvmsg-debuginfo-7.3.19-2.mga7
php-sysvsem-debuginfo-7.3.19-2.mga7
php-sysvshm-debuginfo-7.3.19-2.mga7
php-tidy-debuginfo-7.3.19-2.mga7
php-tokenizer-debuginfo-7.3.19-2.mga7
php-xml-debuginfo-7.3.19-2.mga7
php-xmlreader-debuginfo-7.3.19-2.mga7
php-xmlrpc-debuginfo-7.3.19-2.mga7
php-xmlwriter-debuginfo-7.3.19-2.mga7
php-xsl-debuginfo-7.3.19-2.mga7
php-wddx-debuginfo-7.3.19-2.mga7
php-zip-debuginfo-7.3.19-2.mga7
php-fpm-debuginfo-7.3.19-2.mga7
phpdbg-debuginfo-7.3.19-2.mga7

SRPM:
php-7.3.19-2.mga7.src.rpm

Assignee: mageia => qa-bugs

Comment 3 PC LX 2020-06-19 23:19:36 CEST
Installed and tested without issues.


Using PHP FastCGI Process Manager with socket activation.

Tested with large and small scripts (wordpress, drupal, phpmyadmin, roundcubemail, etc) using HTTP(S) and CLI. No issues noticed.


System: Mageia 7, x86_64, Apache, PHP FPM, Intel CPU.


$ uname -a
Linux marte 5.6.14-desktop-2.mga7 #1 SMP Wed May 20 23:14:20 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
$ rpm -qa | grep php.*7.3.19 | sort
apache-mod_php-7.3.19-2.mga7
lib64php_common7-7.3.19-2.mga7
php-bz2-7.3.19-2.mga7
php-cli-7.3.19-2.mga7
php-ctype-7.3.19-2.mga7
php-curl-7.3.19-2.mga7
php-dom-7.3.19-2.mga7
php-exif-7.3.19-2.mga7
php-fileinfo-7.3.19-2.mga7
php-filter-7.3.19-2.mga7
php-fpm-7.3.19-2.mga7
php-ftp-7.3.19-2.mga7
php-gd-7.3.19-2.mga7
php-gettext-7.3.19-2.mga7
php-hash-7.3.19-2.mga7
php-iconv-7.3.19-2.mga7
php-ini-7.3.19-2.mga7
php-intl-7.3.19-2.mga7
php-json-7.3.19-2.mga7
php-ldap-7.3.19-2.mga7
php-mbstring-7.3.19-2.mga7
php-mysqli-7.3.19-2.mga7
php-mysqlnd-7.3.19-2.mga7
php-openssl-7.3.19-2.mga7
php-pdo-7.3.19-2.mga7
php-pdo_mysql-7.3.19-2.mga7
php-pdo_sqlite-7.3.19-2.mga7
php-posix-7.3.19-2.mga7
php-session-7.3.19-2.mga7
php-sockets-7.3.19-2.mga7
php-sysvsem-7.3.19-2.mga7
php-sysvshm-7.3.19-2.mga7
php-tokenizer-7.3.19-2.mga7
php-xml-7.3.19-2.mga7
php-xmlreader-7.3.19-2.mga7
php-xmlwriter-7.3.19-2.mga7
php-zip-7.3.19-2.mga7
php-zlib-7.3.19-2.mga7
$ systemctl status php-fpm.socket php-fpm.service
● php-fpm.socket - php-fpm Server Socket
   Loaded: loaded (/usr/local/lib/systemd/system/php-fpm.socket; enabled; vendor preset: disabled)
   Active: inactive (dead) since Fri 2020-06-19 22:01:41 WEST; 15min ago
   Listen: /var/lib/php-fpm/php-fpm.sock (Stream)

jun 19 22:01:07 marte systemd[1]: Listening on php-fpm Server Socket.
jun 19 22:01:41 marte systemd[1]: php-fpm.socket: Succeeded.
jun 19 22:01:41 marte systemd[1]: Closed php-fpm Server Socket.

● php-fpm.service - The PHP FastCGI Process Manager
   Loaded: loaded (/usr/lib/systemd/system/php-fpm.service; disabled; vendor preset: disabled)
   Active: active (running) since Fri 2020-06-19 22:01:41 WEST; 15min ago
 Main PID: 22854 (php-fpm)
   Status: "Processes active: 0, idle: 2, Requests: 87, slow: 0, Traffic: 0req/sec"
    Tasks: 3 (limit: 4697)
   Memory: 64.9M
   CGroup: /system.slice/php-fpm.service
           ├─22854 php-fpm: master process (/etc/php-fpm.conf)
           ├─23106 php-fpm: pool www
           └─23126 php-fpm: pool www

jun 19 22:01:41 marte systemd[1]: Starting The PHP FastCGI Process Manager...
jun 19 22:01:41 marte systemd[1]: Started The PHP FastCGI Process Manager.

CC: (none) => mageia

Comment 4 PC LX 2020-06-26 11:19:34 CEST
This has been working OK for a week, see comment 3, so I'm pushing it forward.

Please unok if you think its needed.

Whiteboard: (none) => MGA7-64-OK

Comment 5 Thomas Andrews 2020-06-27 23:02:44 CEST
Validating. Advisory information in Comment 2.

Keywords: (none) => validated_update
CC: (none) => andrewsfarm, sysadmin-bugs

Nicolas Lécureuil 2020-07-06 22:04:06 CEST

Keywords: (none) => advisory
CC: (none) => mageia

Comment 6 Mageia Robot 2020-07-06 22:43:44 CEST
An update for this issue has been pushed to the Mageia Updates repository.

https://advisories.mageia.org/MGAA-2020-0153.html

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.