note 72375 added to ref.errorfunc

From: Date: Tue, 16 Jan 2007 19:11:35 +0000
Subject: note 72375 added to ref.errorfunc
Groups: php.notes 
Request: Send a blank email to php-notes+get-121805@lists.php.net to get a copy of this message
I have found that on servers that enforce display_errors to be off it is very inconvenient to debug syntax errors since they cause fatal startup errors. I have used the following method to bypass this limitation: The syntax error is inside the file "syntax.php", therefore I create a file "syntax.debug.php" with the following code: <?php error_reporting(E_ALL); ini_set('display_errors','On'); include('syntax.php'); ?> The 5 line file is guaranteed to be free of errors, allowing PHP to execute the directives within it before including the file which previously caused fatal startup errors. Now those fatal startup errors become run time fatal errors. ---- Server IP: 69.147.83.197 Probable Submitter: 74.109.156.232 ---- Manual Page -- http://www.php.net/manual/en/ref.errorfunc.php Edit -- https://master.php.net/note/edit/72375 Del: integrated -- https://master.php.net/note/delete/72375/integrated Del: useless -- https://master.php.net/note/delete/72375/useless Del: bad code -- https://master.php.net/note/delete/72375/bad+code Del: spam -- https://master.php.net/note/delete/72375/spam Del: non-english -- https://master.php.net/note/delete/72375/non-english Del: in docs -- https://master.php.net/note/delete/72375/in+docs Del: other reasons-- https://master.php.net/note/delete/72375 Reject -- https://master.php.net/note/reject/72375 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#121805) next »