Mateobus Posted October 10, 2006 Share Posted October 10, 2006 I am trying to configure my php.ini file so that it displays error. I am not too familiar with this file, but i think that these two lines have someithing to do with displaying errors:error_reporting = E_ALL & ~E_NOTICEdisplay_errors = Onis there any other reason why errors would not display? Quote Link to comment https://forums.phpfreaks.com/topic/23592-php-display-errors/ Share on other sites More sharing options...
GremlinP1R Posted October 10, 2006 Share Posted October 10, 2006 That all depends on how you write your scriptif you dont tell it to show error if failed then it will not show anything. Quote Link to comment https://forums.phpfreaks.com/topic/23592-php-display-errors/#findComment-107109 Share on other sites More sharing options...
Mateobus Posted October 10, 2006 Author Share Posted October 10, 2006 How do i tell it to show errors then. Also, I have written hundreds of scripts where it showed me errors without me explicitly telling it to do so. Quote Link to comment https://forums.phpfreaks.com/topic/23592-php-display-errors/#findComment-107131 Share on other sites More sharing options...
GremlinP1R Posted October 10, 2006 Share Posted October 10, 2006 Well I know on my php server I'm running on my pc for ofline viewing I have to uses the "or die()" statement to get any errors. Quote Link to comment https://forums.phpfreaks.com/topic/23592-php-display-errors/#findComment-107135 Share on other sites More sharing options...
wildteen88 Posted October 11, 2006 Share Posted October 11, 2006 Try something like this:[code]<?phpif($var == bla) echo "var is bla";}?>[/code]Obviously I have deliberatly leftout the opening curly bracket to force an error inbthe code. You should get an error like the following:Parse error: parse error, unexpected '}' in path/to/your/file/here]on line 5If you mean notice errors, which are not errors. You'll want to remove [b]& ~E_NOTICE[/b] from the error_reporting directive in the php.ini Quote Link to comment https://forums.phpfreaks.com/topic/23592-php-display-errors/#findComment-107407 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.