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 Link to comment https://forums.phpfreaks.com/topic/158720-solved-can-i-pause-of-stop-a-php-script-at-an-error-message/ Share on other sites More sharing options...
Masna Posted May 19, 2009 Share Posted May 19, 2009 View Source, perhaps? Link to comment https://forums.phpfreaks.com/topic/158720-solved-can-i-pause-of-stop-a-php-script-at-an-error-message/#findComment-837076 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. } Link to comment https://forums.phpfreaks.com/topic/158720-solved-can-i-pause-of-stop-a-php-script-at-an-error-message/#findComment-837089 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 Link to comment https://forums.phpfreaks.com/topic/158720-solved-can-i-pause-of-stop-a-php-script-at-an-error-message/#findComment-837785 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 Link to comment https://forums.phpfreaks.com/topic/158720-solved-can-i-pause-of-stop-a-php-script-at-an-error-message/#findComment-839816 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.