Topic: Config in /etc/httpd/conf.d/php.conf is wrong for MPM-ITK

I installed php-7.1.26-1.el6.remi.x86_64 and received an updated /etc/httpd/conf.d/php.conf config file. But the config contains logic that is wrong for the ITK MPM, which is a variant of prefork.

# Cannot load both php5 and php7 modules
<IfModule !mod_php5.c>
  <IfModule prefork.c>
    LoadModule php7_module modules/libphp7.so
  </IfModule>
</IfModule>


<IfModule !mod_php5.c>
  <IfModule !prefork.c>
    LoadModule php7_module modules/libphp7-zts.so
  </IfModule>
</IfModule>

It says "prefork do this, otherwise not prefork do the opposite" and the result is MPM ITK (variant of prefork) + the ZTS version of PHP. I next loaded PHP7 myself in an earlier config, but since the block itself assumes PHP7 will not be loaded already it still tries and produces a warning on the console.

I suggest wrapping the entire block in <IfModule !mod_php7.c> and also adding explicit support for itk.c, worker.c, and event.c.

Re: Config in /etc/httpd/conf.d/php.conf is wrong for MPM-ITK

1/ itk is a really specific MPM, I don't really try and suport

I have no idea what is the proper checek for itk, and to be honest, use FPM wink   (which allow 1 pool per app / user, and solve the itk goal in a better way)

2/ worker and event, MUST prefer php-fpm

See https://developers.redhat.com/blog/2017 … tion-tips/

So, mod_php is deprecated.

Desktop: Fedora 29 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 28 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

Re: Config in /etc/httpd/conf.d/php.conf is wrong for MPM-ITK

Also in EL-6, itk is an awfull hack over httpd 2.2, starting with 2.4, I think everything is simpler, as prefork MPM is used.

Desktop: Fedora 29 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 28 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

Re: Config in /etc/httpd/conf.d/php.conf is wrong for MPM-ITK

Sorry, but I don't want to introduce major change in RPM, especially for EL-6 which is close to EOL.

A simple replace "prefork" by "itk" in php.conf will works

And I heartily recommend you upgrade to C7, and httpd 2.4 and php-fpm.

Desktop: Fedora 29 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 28 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test