Artix Linux Forum

Artix Linux => System => Topic started by: kiblaster on 14 June 2024, 19:36:23

Title: [SOLVED] apache can't run PHP
Post by: kiblaster on 14 June 2024, 19:36:23
I installed php-apache.

I could not see a thing so I checked the files:
Code: [Select]
pacman -Ql php-apache 
php-apache /etc/
php-apache /etc/httpd/
php-apache /etc/httpd/conf/
php-apache /etc/httpd/conf/extra/
php-apache /etc/httpd/conf/extra/php_module.conf
php-apache /usr/
php-apache /usr/lib/
php-apache /usr/lib/httpd/
php-apache /usr/lib/httpd/modules/
php-apache /usr/lib/httpd/modules/libphp.so

I added to `/etc/httpd/conf/httpd.conf`:
Code: [Select]
Include conf/extra/php_module.conf
LoadModule php_module /usr/lib/httpd/modules/libphp.so

Apache service does not start anymore:
Code: [Select]
Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe.  You need to recompile PHP.
Title: Re: apache can't run PHP
Post by: gripped on 14 June 2024, 22:38:16
Do you do any research for yourself before posting ?

https://wiki.archlinux.org/title/Apache_HTTP_Server#Apache_is_running_a_threaded_MPM,_but_your_PHP_Module_is_not_compiled_to_be_threadsafe.

Title: Re: apache can't run PHP
Post by: kiblaster on 15 June 2024, 09:51:28
Yes I searched that error but I did not found the Arch wiki.
I tried that fix already, and apache started but I did not see anything.

I was missing "AddHandler php-script .php" in the conf https://wiki.archlinux.org/title/Apache_HTTP_Server#Using_libphp.

If I need php-mbstring and php-curl can I just use php83-mbstring and php83-curl from the AUR?