I need libphp7.so module to configure apache on Centos
I am following this tutorial to use php7 or phpng on my Centos 6.5 with apache.
I can run php scripts in the console, but I would like to be able to run php scripts using Apache Server.
I need help because I cannot find the libphp7.so module. I don't know if I need to create it or what.
source to share
I believe you need to add --with-apxs2
to the script config. According to the link provided, I don't see this in the configure flags. --with-apxs2
will "Build a generic Apache 2.0 handler module". You may also need to make sure you have your apache config installed:
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
The first time I built php7 it just displayed the source, not executed it, but added that it caused it to execute the code.
If you want to try with Docker, I just created a Docker image for PHP7 at https://registry.hub.docker.com/u/silintl/php7/ You can also just view the Dockerfile which includes all the commands used for its installation and settings.
source to share
Thanks to Phillip who gives some hints for this problem, but in my case I solved my problem like this:
1 - Copy the php7.so library that you have in your apache module directory with this command: sudo cp / etc / httpd / modules / libphp7.so / opt / bitnami / apache2 / modules
2 - add the following code to the Apache config file:
LoadModule php7_module./modules/libphp7.so Application SetHandler / x-httpd-php
And PHP worked fine after that!
source to share