Re: logging erros and user access to logs
| From: | Richard Lynch | Date: | Wed, 14 Mar 2007 22:25:38 +0000 |
| Subject: | Re: logging erros and user access to logs | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-250610@lists.php.net to get a copy of this message | ||
Get the errors OFF the web page (display_errors OFF) and into the logs
and provide your users with logs for their own domains with vhosts.
On Wed, March 14, 2007 11:02 am, Jason Joines wrote:
> 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¡d
> _µT'Â.|¶!àÊ 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
>
>
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?