RHEL8 and Centos7 httpd - php processing differently

Viewed 46

I'm having an issue with httpd (Apache) on RHEL8. I've previously had this working and configured on Centos7 without any issues. Due to Centos7 depreciation, I've started migrating to RHEL8 but having an issue.

The first is - php includes do not process for any page other than pages which are housed in the root folder of the php directory.

Notes: I've configured the $_SERVER['DOCUMENT_ROOT'] on both servers and the variable in a phpinfo page results in the same - so I know this is being parsed correctly. I'm worried this is a difference in the php modules between RHEL8 and Centos7. I know there are different ways to install the modules.

On the RHEL8 server I do not have a section in my phpinfo page labeled "apache2handler" as I do on the Centos7 box.

When I am looking on the servers themselves- I see the following:

php -v
PHP 7.3.33 (cli) (built: XXX X XXXX 08:45:13) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.33, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.33, Copyright (c) 1999-2018, by Zend Technologies

(identical output minus the build date). Same versions, etc.

I do notice the repo for the php73 on the Centos7 comes from "remi-php73" whereas the RHEL8 box is using remi-safe. Not sure if this is relevant.

1 Answers

I do notice the repo for the php73 on the Centos7 comes from "remi-php73" whereas the RHEL8 box is using remi-safe.

For a proper installation, follow the wizard instructions as RHEL-8 now uses "modules".

Question about mod_php have been answered in RHEL8 HTTPD php missing "apache 2.0 handler"

The first is - php includes do not process for any page other than pages which are housed in the root folder of the php directory.

More explanation about the issue welcome.

Could be permission issue, selinux configuration, php configuration, short tag usage (<? instead of <?php)...

Related