Menu

Saturday, November 13, 2021

PHP does not show render pages


If you installed PHP via package (like yum -y install php), then you should have an /etc/httpd/conf.d/php.conf that specifies the needed entries. If apache was running when you installed php, then you have to restart apache for it to pick up the configuration change


You can also check if the error log is enabled. When it is disabled, and the code has a syntax error, nothing is shown on the screen. 


Display errors could be turned off in the php.ini or your Apache configuration file.

You can turn it on in the script:

error_reporting(E_ALL);
ini_set('display_errors', '1');


Another solution is that you have to enable PHP5 module in Apache, 


sudo a2enmod php5
sudo service apache2 restart

here you can see and try this