ahvceo Posted May 19, 2009 Share Posted May 19, 2009 Hi Again All, When I run my php script, a screen flashes with error messages on it but then in covered be the http screen. Is there any way I can make the server "pause" or "stop" so I can see these error messages? Thanks ahvceo Quote Link to comment Share on other sites More sharing options...
Masna Posted May 19, 2009 Share Posted May 19, 2009 View Source, perhaps? Quote Link to comment Share on other sites More sharing options...
starphp Posted May 19, 2009 Share Posted May 19, 2009 By setting a php error handler, you can do this. It is possible to log the errors or you can stop the execution. Please have a look on the php function: set_error_handler("customErrorHandler"); function customErrorHandler($error_level, $error_message, $error_file, $error_line, $error_context) { exit("$error_message"); // You can also, log the error to a php file and can be view from there also. } Quote Link to comment Share on other sites More sharing options...
ahvceo Posted May 20, 2009 Author Share Posted May 20, 2009 Thanks Starphp for the information. I am from the old school and started programming in 1962 so I like to see errors output to a file. How do I log the errors other than fopen, fwrite and fclose? Thabks again ahvceo Quote Link to comment Share on other sites More sharing options...
ahvceo Posted May 22, 2009 Author Share Posted May 22, 2009 Thanks All, I have the problem in habd now thanks to your help. ahvceo 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.