You are not logged in.

#1 2021-03-27 19:38:55

arch251
Member
Registered: 2021-03-20
Posts: 8

(Solved) Apache Cannot Load modules/libphp7.so Into Server

I am having a problem with apache being about to load php into the server and serve basic webpages (such as info.php) to localhost.

systemctl status apache
systemd[1]: Started Apache Web Server
httpd [1444]: httpd: Syntax error on line 542 of /etc/httpd/conf/httpd.conf: Cannot load modules/libphp7.so into server: /etc/
systemd[1]: httpd.service Main process exited, code=exited, status=1/FAILURE
systemd[1]: httpd.service Failed with result 'exit-code'.

In my /etc/httpd/conf/httpd.conf file:

 LoadModule php_module modules/libphp7.so
AddHandler php7-script php
Include conf/extra/php7_module.conf

I am thinking that I may be referencing the wrong php version or I do not have the correct php version installed from the AUR.

If someone could point me in the right direction, I would be grateful.

Last edited by arch251 (2021-03-27 20:53:44)

Offline

#2 2021-03-27 19:54:26

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 29,260
Website

Re: (Solved) Apache Cannot Load modules/libphp7.so Into Server

pacman -F libphp7.so

Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2021-03-27 20:12:20

arch251
Member
Registered: 2021-03-20
Posts: 8

Re: (Solved) Apache Cannot Load modules/libphp7.so Into Server

jasonwryan wrote:
pacman -F libphp7.so

I tried this and the error persists.

localhost/index.html works fine ...
localhost/info.php gives me the error "cannot load modules/libphp7.so into server".

The current version of php I am using is php-8.0.3-1 and also php-apache-8.0.3-1

Perhaps I need to change which php module is being referenced with the LoadModule command to php8?

Last edited by arch251 (2021-03-27 20:22:11)

Offline

#4 2021-03-27 20:40:51

arch251
Member
Registered: 2021-03-20
Posts: 8

Re: (Solved) Apache Cannot Load modules/libphp7.so Into Server

Here is what I currently have installed for php:

  • php-8.0.3-1

  • php-cgi-8.0.3-1

  • php-gd-8.0.3-1

  • php-pgsql-8.0.3-1

Offline

#5 2021-03-27 20:53:15

arch251
Member
Registered: 2021-03-20
Posts: 8

Re: (Solved) Apache Cannot Load modules/libphp7.so Into Server

So it turns out this may just be a change in naming conventions from the PHP team (https://bugs.php.net/bug.php?id=78681).

My solution came where I simply changed /libphp7.so to /libphp.so and similar references as well. It seems with php8 they changed the naming conventions to remove the version number from the module reference:

 LoadModule php_module modules/libphp.so
AddHandler php-script php
Include conf/extra/php_module.conf

Hopefully this is a long-term solution.

Last edited by arch251 (2021-03-27 20:54:50)

Offline

Board footer

Powered by FluxBB