You are not logged in.
Pages: 1
Topic closed
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
pacman -F libphp7.so
Offline
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
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
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
Yes, thanks arch251, worked for me too.
Offline
You don't have php7 installed.
If you have installed PHP then you must have the latest version of PHP
Just replace "php7" everywhere with just "php"
Yo!
Offline
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Pages: 1
Topic closed