I have a PHP server at home for development. It is running:
Ubuntu 9.10
Apache 2.2.12
PHP 5.3.2-0.dotdeb.1
MySql 5.0.7-dev
Currently the settings in the php.ini for displayiong errors are:
display_errors = on
error_reporting = E_ALL
But I do not see any errors in my php script. Also very strange is that phpinfo() shows me this:
display_errors Off
I checked the php.ini file, and restarted the apache server many times, but with no luck. Does anybody knows how this is possible?
edit:
When I localy set this:
ini_set('display_errors', 'on');
I do receive errors.
The quickest way to display all php errors and warnings is to add these lines to your PHP code file: ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL);
You can show all errors by adding a few lines to your local testing site's settings. php: error_reporting(E_ALL); ini_set('display_errors', TRUE); ini_set('display_startup_errors', TRUE); In addition, navigate to Administration→ Configuration→ Development → logging and errors and select "All messages".
There are three (3) types of fatal errors: Startup fatal error (when the system can't run the code at installation) Compile time fatal error (when a programmer tries to use nonexistent data) Runtime fatal error (happens while the program is running, causing the code to stop working completely)
Is the display_errors
parameter listed more than once in your php.ini file? If its defined more than once, the second instance of it will override the first.
Ubuntu keeps separate copies of the php.ini file for each type of PHP installation.
I'm not familiar with the dotdeb release, but I'd guess it'd be in /etc/php5/apache2/php.ini
Edit: Since this is apparently not the case, try restarting Apache. PHP won't pick up changed settings until you do.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With