dave_c00 Posted October 10, 2006 Share Posted October 10, 2006 Hello,I have recently hired a new server and the php.ini file is different to what I usually have.The display errors section is set to off.I quite like the idea of this as the server is going to contain mostly my sites so no errors is good. However when writing scripts I would like to be able to see any errors so I was planning on using ini_set to display them.I have tried using:[code]error_reporting(E_ALL);ini_set("display_errors", 1);[/code]at the top of a script but cannot get any parse or fatal errors displayed just blank pages. I can get Notices displayed but no parse or fatals.Can anyone help? Maybe I need to put another ini_set before... I have php version 4.3.9 installed.ThanksDave Quote Link to comment https://forums.phpfreaks.com/topic/23539-php-error_reporting/ Share on other sites More sharing options...
Daniel0 Posted October 10, 2006 Share Posted October 10, 2006 What you got should work, but you could try this instead:[code]ini_set('error_reporting', E_ALL);ini_set("display_errors", 1);[/code] Quote Link to comment https://forums.phpfreaks.com/topic/23539-php-error_reporting/#findComment-106837 Share on other sites More sharing options...
redbullmarky Posted October 10, 2006 Share Posted October 10, 2006 the problem with that is that the script needs to be run for it to work - but if there's certain types of error, the script wont run at all and neither will those lines.what i always do during development is to set up a .htaccess file in my webroot with these four lines:[code]php_flag display_errors onphp_flag display_startup_errors onphp_flag log_errors offphp_value error_reporting E_ALL[/code]and when i'm done, i just delete the filehope that helpscheersMark Quote Link to comment https://forums.phpfreaks.com/topic/23539-php-error_reporting/#findComment-106867 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.