Tag Archives: Execute

Apache Shows PHP Code Instead Of Executing CentOS Linux

Make sure that PHP is installed and running correctly. An easy way to check is to run php -v from a command line and see if returns version information or any errors.

Make sure that the PHP module is listed and uncommented inside of your Apache’s httpd.conf

LoadModule php7_module modules/libphp7.so

Make sure that Apache’s httpd.conf file has the PHP MIME type in it. This should be something like AddType application/x-httpd-php .php. This tells Apache to run .php files as PHP. Search for AddType, and then make sure there is an entry for PHP, and that it is uncommented.

Share