Hi,
Apache doesn't recognize PHP files or PHP scripts embedded within HTML. All PHP code is displayed within web pages as text and is not rendered by the PHP engine. Here is what I have:
PHP 5.6.37
Apache 2.4.39
CentOS 7.8.2003
I have tried the following in order to get Apache to recognized the file types:
httpd.conf:
<FilesMatch \.(html|php)$>
SetHandler application/x-httpd-php56
</FilesMatch>
.htaccess:
AddHandler application/x-httpd-php56 .php .html .htm
These directives did not fix the issue. I tried different suggestions from other forums too, but no success there either.
I did recompile both Apache and PHP (in that order) with no change. I suspect the issue may be that the libphp5.so module cannot be found anywhere on my server, and there is no associated LoadModule command in the httpd.conf file (LoadModule php5_module modules/libphp5.so). Thus, it seems Apache doesn't know that PHP even exists.
Any ideas how to recompile so that this module will be included? Or ideas how to obtain this module so that I can move on with development? Could it be a LAMP issue? Any help is appreciated...
Thank you