Bug 2225332 - 20-php.conf and libphp.so do not exist on RHEL9 [NEEDINFO]
Summary: 20-php.conf and libphp.so do not exist on RHEL9
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: Documentation
Version: 9.2
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: 9.2
Assignee: Lucie Vařáková
QA Contact:
Lenka Špačková
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-07-25 01:06 UTC by kazuhiro kawana
Modified: 2023-08-01 14:30 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Deprecated Functionality
Doc Text:
.The `mod_php` module provided with PHP for use with the Apache HTTP Server has been deprecated The `mod_php` module provided with PHP for use with the Apache HTTP Server in RHEL 8 is available but not enabled in the default configuration. The module is no longer available in RHEL 9. Since RHEL 8, PHP scripts are run using the FastCGI Process Manager (`php-fpm`) by default. For more information, see https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_basic_system_settings/assembly_using-the-php-scripting-language_configuring-basic-system-settings#using-the-php-scripting-language-with-a-web-server_assembly_using-the-php-scripting-language[Using PHP with the Apache HTTP Server].
Clone Of:
Environment:
Last Closed: 2023-08-01 14:30:30 UTC
Type: Bug
Target Upstream Version:
Embargoed:
kkawana: needinfo? (rcollet)


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-163216 0 None None None 2023-07-25 01:09:09 UTC

Description kazuhiro kawana 2023-07-25 01:06:36 UTC
### Description of problem:
We installed php package on RHEL9, but we could not find conf and library files.

~~~
# ls /etc/httpd/conf.modules.d/*php*
ls: cannot access '/etc/httpd/conf.modules.d/*php*': No such file or directory

# ls /etc/httpd/modules/*php*
ls: cannot access '/etc/httpd/modules/*php*': No such file or directory
~~~

I checked at the RHEL9 release notes, but there was no mention of 20-php.conf and libphp.so.

And we check php.spec file in php source package.
The spec file contains conf file and library definitions.

...snip...
1394 %files
1395 %if %{with modphp}
1396 %{_httpd_moddir}/libphp.so
1397 %config(noreplace) %{_httpd_modconfdir}/20-php.conf
1398 %attr(0770,root,apache) %dir %{_sharedstatedir}/php/session
1399 %attr(0770,root,apache) %dir %{_sharedstatedir}/php/wsdlcache
1400 %attr(0770,root,apache) %dir %{_sharedstatedir}/php/opcache
1401 %config(noreplace) %{_httpd_confdir}/php.conf
1402 %endif
...snip...


### Version-Release number of selected component (if applicable):
php-8.1.14-1.module+el9.2.0+17911+b059dfc2
php-8.0.27-1.el9_1

### How reproducible:

Anytime

### Steps to Reproduce:
#dnf Install php

or

# dnf module disable php
# dnf module enable php:8.1
# dnf update php


### Actual results:
We can not installed 20-php.conf and libphp.so.


### Expected results:
If 20-php.conf and libphp.so are available, please make them installable.
If them are not available please make an announcement in the documentation or knowledge.

Comment 2 Remi Collet 2023-07-25 08:04:45 UTC
Since RHEL-8 httpd runs in event mode which is not supported by mod_php (threaded mode)
As explain in https://www.php.net/manual/en/faq.installation.php#faq.installation.apache2

So httpd uses mod_proxy to php-fpm to execute PHP script
This works out of the box with the default provided configuration

In RHEL-8 mod_php is still available but not used, and imply to switch back httpd to "prefork" mode

In RHEL-9 mod_php is no more available


mod_php removal improves performance (http in thread mode + http2 support), and security (different process)


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