logging erros and user access to logs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



    My users want to be able to debug their scripts, see mysql errors,
and such.  Using mysql_error(), and display_errors, problems such as
non-existent databases, or variable and such seem to get printed to the
screen.  However, syntax errors do not.  They get written to the global
php log, for example, "PHP Parse error:  parse error, unexpected T_ECHO,
expecting ',' or ';'" when a semi-colon is missing.  I can't just give
all system users access to the global log.

    I saw an example at
http://www.php.net/manual/en/ref.errorfunc.php#ini.display-errors that
seemed to suggest including the script to debug in something like this
demodebug.php script would do the trick:

<?php
error_reporting(E_PARSE);
ini_set('display_errors','On');
ini_set('display_startup_errors','On');
include('demo.php');
?>

When I remove a semi-colon from demo.php and load demodebug.php in the
browser, nothing is displayed on the screen.  The error still goes to
the global log.

    I'm running PHP 4.3 on Apache 2.  I have these settings in my php.ini:

error_reporting  =  E_ALL & ~E_NOTICE
display_errors = Off
display_startup_errors = Off

I thought the above debugdemo.php script was basically supposed to do a
local override so that script could display the errors.

    Is there any good way to let users see all the errors from their
scripts.


Jason Joines
=================================

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux