I have installed xampp on ubuntu. PHP is configured to show all possible errors, warnings, notices etc, but when i make an error in php code no error is displayed.
W开发者_C百科hen i copy that file to other computer (debian with native apache, mysql and php set) and open it in browser it shows
Fatal error: Call to a member function fetch() on a non-object in...
as expected, so why xampp with identical php.ini shows just an empty page?
Another solution is
add this line in your .htaccess
file
php_value display_errors on
there may be some serever configure mistake
write below as first line at your php page
ini_set('error_reporting', E_ALL);
ini_set( 'display_errors', 1 );
NOTE: use Xdebug
Find your php.ini file. You can find the location by typing php --ini
in the terminal.
Then look for display_errors and set it to 1. And error_reporting to E_ALL.
This will set the value globally.
If you only need to see errors for a particular script or application:
error_reporting( E_ALL );
ini_set( 'display_errors', 1 );
http://php.net/manual/en/function.error-reporting.php
http://php.net/manual/en/errorfunc.configuration.php
精彩评论