-2

I do find a lot similar problems on CentOS in this forum, and I tried to follow any suggestions mentioned in their answer, however, none solves my problem. Therefore I’m opening this question for platform specific solution.

I have downloaded httpd, php, php-common, php-cli. From some answer it seems having php installed would be already sufficient, but the PHP file is not handled by php. I tried to search for libphp, *php* with yum and dnf command, but returned result does not have any match to httpd/apache module for php. On ubuntu server I do find similar module mentioned in other answer and php is working properly to phrase the page. I also set fileMatch to set handler, but I think due to the missing libphp8.so module it is not working.

From the search suggested in the comment below, I found php-embedded is the only package that provide libphp.so or libphp-8.0.so. However, neither has symbol php_module, but both are callable by php_embed_module. So I added this in the config file, but apachectl configtest shows it is not an apache module. The answer below has suggested php-fpm, but from the install utility it seems to be Nginx-based.

I was wondering since Red hat and Oracle are both CentOS like, can I just add RHEL 9's repo to dnf and check if they have a compatible module. But would that has compatibility concerns?

The HTTPD version is (httpd -v):

Server version: Apache/2.4.53 (Oracle Linux Server) 

The PHP version is:

PHP 8.0.20 

and The system version is (cat /etc/os-release | grep PRETTY_NAME):

PRETTY_NAME="Oracle Linux Server 9.1" 
4
  • You can search which package to install with yum whatprovides libphp.so. Commented Jan 29, 2023 at 13:02
  • @setenforce1 That returns Error: No matches found.... But luckily adding */ helps. Thanks for the comment Commented Jan 30, 2023 at 11:00
  • We're not a forum. Commented Jan 30, 2023 at 12:09
  • I found that it was due to repeated httpd configuration, the handler for .php file was set twice referring the same handler Commented Mar 12, 2023 at 14:38

1 Answer 1

0

You did not set your repo properly. Or do not search for the proper package. Here is the repo for Oracle Linux 9 and as you can see there are php packages.

Check here for Oracle procedure how to install it.

You can also check here how to install php on OracleLinux.

And BTW check for php-fpm

5
  • No, I’ve installed php but there is no libphp.so library for apache Commented Jan 28, 2023 at 21:45
  • I also checked if there is mod_php.so but that’s also not the case Commented Jan 28, 2023 at 21:47
  • See my edited answer Commented Jan 29, 2023 at 9:07
  • Your latter way needs to disable SELinux Policy. and the first guide is also only installing php (which I did), but I do found, with dnf whatprovides the php-embedded to be the right one to install. Commented Jan 30, 2023 at 11:03
  • Just want to add, the library comes with php-embedded is not a apache module (configtest has warned me), and does not have php_module or mod_php in it's symbol (from nm -gD libphp-8.0.so it seems only php_embed_module is suitable). Moreover, the php-fpm you mentioned appears to work with Nginx (since the install requires additional nginx-filesystem package) Commented Jan 30, 2023 at 11:34

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.