Score:-2

libphp.so is missing in the oracle linux 9, is there any alternative to let httpd handle php page?

ir flag

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"
setenforce 1 avatar
us flag
You can search which package to install with `yum whatprovides libphp.so`.
jimmymcheung avatar
ir flag
@setenforce1 That returns `Error: No matches found.`... But luckily adding `*/` helps. Thanks for the comment
br flag
We're not a forum.
jimmymcheung avatar
ir flag
I found that it was due to repeated httpd configuration, the handler for `.php` file was set twice referring the same handler
Score:0
in flag

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

jimmymcheung avatar
ir flag
No, I’ve installed `php` but there is no `libphp.so` library for apache
jimmymcheung avatar
ir flag
I also checked if there is `mod_php.so` but that’s also not the case
Romeo Ninov avatar
in flag
See my edited answer
jimmymcheung avatar
ir flag
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.
jimmymcheung avatar
ir flag
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)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.