php doesnt show error
Solution 1
You might to configure error_reporting
(see also), and enable the displaying of errors (see display_errors
or ini_set) -- at least on your development machine
In your php.ini file, you'd use
error_reporting = E_ALL | E_STRICT
display_errors = On
html_errors = On
Or, in your PHP code :
error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', 'On');
You might also want to install Xdebug on your development box, to get nice stacktraces wehn an error / exception occurs
Of course, on your production machine, you probably don't want to display errors ; so that will have to be configured depending on your environment ;-)
Solution 2
It is almost certainly the case that display_errors
is disabled in php.ini.
This is a good thing on product servers, and makes development systems basically unusable.
For a development system you probably want to add one of these lines to you php.ini file:
error_reporting = E_ALL & ~E_NOTICE
or
error_reporting = E_ALL
Solution 3
Create a file for example test.php with this content:
<?php
phpinfo();
?>
Execute it in your browser and search where the php.ini file is located. Than turn error reporting and displaying errors in php.ini on.
webkul
WebKul provides e-commerce and ERP design, development, strategy, and website support services for Magento , OpenERP and Joomla. we are the largest collection of popular open source platform plugins @ https://store.webkul.com
Updated on June 17, 2022Comments
-
webkul almost 2 years
im working in php on suse11.0 my problem is when i type a wrong syntax or query it doesnt show error only blank page shown at this situtaion
thanks
-
Amber over 14 yearsTo add to this, you can probably find the errors in the webserver's log (for Apache, this is often /var/log/httpd/error_log)