nwrfoto Posted May 20, 2010 Share Posted May 20, 2010 I'm becoming confused with php error reporting so I hope someone can helm me. Basically I want to see a message when I have an error in my code. For example a simple snippet like this should produce an error: echo "hello world" echo "hello world 2"; Without the semi-colon after the first echo i should get an error but what i actually get is a blank page. I have edited the php.ini and restarted the server to confirm that display errors is set to on (was originally off). I have also tried all of the error reporting types: (E_ALL, E_NOTICE etc etc etc) None of them will show an error message with the above type of error, only a blank screen. i do get messages if i do not declare a variable etc but the most common errors (for me at least) are syntax errors such as missing out semi colons or misplacing a bracket etc. How can I see these messages????? Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted May 20, 2010 Share Posted May 20, 2010 If you set display_errors=On and error_reporting=E_ALL then you should see an error. Otherwise you probably didn't install PHP properly. Does it display something for "valid" PHP scripts? Quote Link to comment Share on other sites More sharing options...
nwrfoto Posted May 20, 2010 Author Share Posted May 20, 2010 Valid php scripts work fine. In fact everything works fine except that I have written a long script and cannot find the problem in the code without the error messages. I do NOT want to see messages such as undeclared variables etc but DO want to see those which are stopping the script from running. Quote Link to comment 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.