Skip to main content
added 402 characters in body
Source Link
ivanivan
  • 5.1k
  • 1
  • 14
  • 21

In addition to loading the module (which your httpd.conf file shows it is doing based on the content of your question) you also need to use a SetHandler directive for *.php or other appropriate extensions.

Something like this should work, just put it right after the LoadModule statement.

<FilesMatch ".+\.ph(p[3457]?|t|tml)$">
    SetHandler application/x-httpd-php
</FilesMatch>

What this above statement does it is tells Apache how to deal with files with certain extensions. The .+\.ph(p[3457]?|t|tml)$ is a regular expression (regex) that matches several different endings for the file (the $ indicates end of the string) - so files ending in .php, .php3, .php4, etc. will all get processed by the Apache server and PHP module before being sent to the browser.

Don't forget to restart the httpd service.

If it still doesn't work, check the paths referencing the module to load and make sure the libphp7.so is in the right location to be loaded.

In addition to loading the module (which your httpd.conf file shows it is doing based on the content of your question) you also need to use a SetHandler directive for *.php or other appropriate extensions.

Something like this should work, just put it right after the LoadModule statement.

<FilesMatch ".+\.ph(p[3457]?|t|tml)$">
    SetHandler application/x-httpd-php
</FilesMatch>

Don't forget to restart the httpd service.

If it still doesn't work, check the paths referencing the module to load and make sure the libphp7.so is in the right location to be loaded.

In addition to loading the module (which your httpd.conf file shows it is doing based on the content of your question) you also need to use a SetHandler directive for *.php or other appropriate extensions.

Something like this should work, just put it right after the LoadModule statement.

<FilesMatch ".+\.ph(p[3457]?|t|tml)$">
    SetHandler application/x-httpd-php
</FilesMatch>

What this above statement does it is tells Apache how to deal with files with certain extensions. The .+\.ph(p[3457]?|t|tml)$ is a regular expression (regex) that matches several different endings for the file (the $ indicates end of the string) - so files ending in .php, .php3, .php4, etc. will all get processed by the Apache server and PHP module before being sent to the browser.

Don't forget to restart the httpd service.

If it still doesn't work, check the paths referencing the module to load and make sure the libphp7.so is in the right location to be loaded.

Source Link
ivanivan
  • 5.1k
  • 1
  • 14
  • 21

In addition to loading the module (which your httpd.conf file shows it is doing based on the content of your question) you also need to use a SetHandler directive for *.php or other appropriate extensions.

Something like this should work, just put it right after the LoadModule statement.

<FilesMatch ".+\.ph(p[3457]?|t|tml)$">
    SetHandler application/x-httpd-php
</FilesMatch>

Don't forget to restart the httpd service.

If it still doesn't work, check the paths referencing the module to load and make sure the libphp7.so is in the right location to be loaded.