Reputation: 33
I'm trying to make php show errors, right now all I get is a blank page. I've tried changing the php.ini file that seems to be the php configuration file but to no success. Could it be that phpinfo() is wrong about what config file is been loaded? (I did restart apache)
phpinfo Loaded Configuration File -> /etc/php5/apache2/php.ini. I copy-pasted the path and filename so misspelling it is not an issue.
Upvotes: 2
Views: 20552
Reputation: 849
Enable error reporting at the top of the php page:
ini_set("display_errors", 1);
ini_set("display_startup_errors", 1);
error_reporting(-1);
Upvotes: 4
Reputation: 7310
Place this at the top of your page, but be sure to remove it once you have your errors corrected. You don't want the entire world to be able to have insight into your database structure.
<?php
ini_set('display_errors',1);
error_reporting(E_ALL);
?>
Upvotes: 1
Reputation: 385
do this by using the following code and inside you php.ini file display_errors = on
error_reporting(E_ALL);
ini_set('display_errors',1);
ini_set('error_reporting', E_ALL);
ini_set('display_startup_errors',1);
error_reporting(-1);
Upvotes: 3