I guess I missed the part where you wanted to implement something w/o
changing existing scripts. 

There's no easy way to do it right now. You could write a script that'll
run in the background and combine all of the error logs together. You
can turn on error logs for PHP and for MySQL. You'll still have the
problem of identifying which PHP page caused the MySQL error, though...

---John Holmes...

> -----Original Message-----
> From: PHPCoder [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 23, 2002 2:23 AM
> To: Richard Lynch
> Cc: php-general
> Subject: Re: [PHP] Re: MySQL - PHP combined log
> Thanks, but all these "methods" require modification of the scripts
> already on the server, and it won't ensure any new script being
> by a user on my system to comply.
> Are you all saying that there are no logs kept by default of errors
> generated on php/mysql pages at all unless specifically coded?
> it be possible then in future PHP releases to have a
> directive in the php.ini file that will automatically run a wrapper
> function on all mysql_query() functions to do this kind of thing?
> How are people out there managing the scripts/script errors caused  by
> users on their systems? Or is it a case of "handling the crisis when
> happens"?
> You see, as administrator, I need to be able to quickly see who are
> coding in such a way as to leave security holes, or even worse, cause
> the server to crash due to poor coding. There are almost 1000
> php files on my server, and it wouldn't be possible for me to
> all of them to make sure they are OK.
> Are there any admins out there that have policies about scripting
> practices on their systems; ie, checking a script from a user before
> is allowed to be uploaded etc?
> Thanks
> Richard Lynch wrote:
> >>Hi, tried this on mysql list, no luck:
> >>
> >>I want to be able to view a single log that contains the following:
> >>
> >>IP of user : page_name (PHP only): time/date: MySQL query ( 'select
> >>
> >>from xxx' etc.) : error msg from mysql/php if any
> >
> >>So it's almost a hybrid between apache and mysql with some extra's
> >>
> >>I'm sure you all should see the benifit of this in troubleshooting
> >>specially keeping track of who does what when it comes to PHP coding
> >>ones server, specially with crappy code that kills the server.
> >>
> >>Is something like this possible, already there?
> >>
> >>PS, Running RedHat 7.0 with PHP4 and mysql 3.23.x
> >>
> >
> >http://php.net/error_log
> >
> >if you can get everybody to use your own function to query the
> >
> >Or, you could use http://php.net/set_error_handler and
> >http://php.net/trigger_error and catch all errors thrown by all PHP
> >
> >Actually, to get the PHP page name and line number, set_error_handler
> >probably your best bet.
> >
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

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

Reply via email to