Connect with Expertise | Find Experts, Get Answers, Share Insights

error_reporting() does not show error

comp.lang.php
 
Posts: n/a
#1: Sep 15 '06
I am trying to debug an error found somewhere within my suite of
scripts. Nothing shows up when there's an error, it just simply dies.
I tried using error_reporting(E_ALL); to no avail. I tried everything
I could think of to get some kind of error to show up, to date nothing
shows up. Even trace statements like var_dump(), echo, print_r(),
print, all fail, it dies without even showing any trace elements, even
at the beginning of the first file called!

<?php
/************************************************** ***
editpage.php -- edit page components
************************************************** ***/

// /usr/local/plesk/apache/vhosts/oconsulting.net/httpdocs
print_r("1<P>");
// include libraries
require ("/var/www/lib/lib.inc");
print_r("2<P>");
require ("$userincludes/macros.inc");
print_r("3<P>");

?>

Help!

Phil


R. Rajesh Jeba Anbiah
 
Posts: n/a
#2: Sep 15 '06

re: error_reporting() does not show error


comp.lang.php wrote:
I am trying to debug an error found somewhere within my suite of
scripts. Nothing shows up when there's an error, it just simply dies.
I tried using error_reporting(E_ALL); to no avail.
1. Did you add ini_set('display_errors', 1); too ?
2. If so, the value of display_errors in php.ini might be set to off
and the script is throwing parser error. In that case, this may help
(not tested), if you do not have access to php.ini:
<?php
//debug.php
ini_set('display_errors', 1);
error_reporting(E_ALL); // better set to
error_reporting(E_ALL|E_STRICT); if using PHP 5
eval(file_get_contents('file im testing.php'));
?>

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

comp.lang.php
 
Posts: n/a
#3: Sep 15 '06

re: error_reporting() does not show error



R. Rajesh Jeba Anbiah wrote:
comp.lang.php wrote:
I am trying to debug an error found somewhere within my suite of
scripts. Nothing shows up when there's an error, it just simply dies.
I tried using error_reporting(E_ALL); to no avail.
>
1. Did you add ini_set('display_errors', 1); too ?
Thanx! That turned out to be the one remaining function I forgot to
use! I found the error (or in this case, an embedded MySQL error within
a query string of an unincludeable file)

Phil
2. If so, the value of display_errors in php.ini might be set to off
and the script is throwing parser error. In that case, this may help
(not tested), if you do not have access to php.ini:
<?php
//debug.php
ini_set('display_errors', 1);
error_reporting(E_ALL); // better set to
error_reporting(E_ALL|E_STRICT); if using PHP 5
eval(file_get_contents('file im testing.php'));
?>
>
--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/
Closed Thread