remicollet / remirepo

Issue tracker for
https://rpms.remirepo.net/
277 stars 53 forks source link

PHP 8.1 - Multiple versions - php81-php.conf takes precedence #224

Closed glouton closed 1 year ago

glouton commented 1 year ago

Hi there,

First of all, please forgive me if that's not the right place for this matter.

I've recently installed php 8.1 on a new machine running Rocky Linux 9 with the installation type « Multiple version simultaneously ».

I've been using your repo for years, thanks a lot for that, but I think that's the first time I end up with a config file in /etc/httpd/conf.d In this case « php81-php.conf » which takes precedence over the default php.conf I've put a phpinfo() in apache root /var/www/html and checked and it was showing php 8.1

I've disabled it by simply renaming the file « php81-php.cong.disabled » but, in my humble opinion, I think this file should not be here in the first place in the case of a multiple versions installation.

Regards, Charles

remicollet commented 1 year ago

I understand this can be confusing (see #208)

Current behavior

This exists for ~5 years (since FPM is the default PHP handler, In fedora 27 and EL-8)

Changing this does not seems possible without breaking most of the existing installations.

remicollet commented 1 year ago

I've disabled it by simply renaming the file « php81-php.cong.disabled

This is a bad idea, you should rather comment out its content (else it will be restored on next monthly update)

glouton commented 1 year ago

Hi Rémi,

Thanks a lot for your explanations.

As a matter of fact I haven't use multiple versions since I upgraded my local machine and all my VPS to Rocky Linux 8. Only now that I'm migrating my old dev server running CentOS 7 to a new one with Rocky Linux 9 have I noticed.

A bit confusing indeed as the php cli on the other hand doesn't follow the same rule.

As for your recommendations regarding the Apache PHP conf file, it makes perfect sense. Thank you very much. I've done that for quick test but I'm actually perfectly fine with the higher as default as its a dev server having each vhost configure with its own php-fpm socket.

Best regards, Charles