[SOLVED]Is it possible to store ERRORs into the Database?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
myleow
Forum Contributor
Posts: 194
Joined: Mon Jun 21, 2004 7:05 pm
Location: California

[SOLVED]Is it possible to store ERRORs into the Database?

Post by myleow »

I am dealing with a foreign device and wish to know what PHP Errors were generated.

Is there a way to store the Error generated into the Database?

I know you can just log any logical errors but how do you deal with syntatical errors (whatever it is called)

Regards
Mian

P.S. Doesn't necessary have to be Error, can be Warning too. As long as it is something that will pop up on a Browser that is not suppose to.
Last edited by myleow on Fri Sep 24, 2004 2:43 pm, edited 1 time in total.
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post by patrikG »

[php_man]ob_start[/php_man] is one of PHP's output buffering functions. Grab the buffered content and insert it into the DB.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

you could set your own function as the error processor.. [php_man]set_error_handler[/php_man]
myleow
Forum Contributor
Posts: 194
Joined: Mon Jun 21, 2004 7:05 pm
Location: California

Post by myleow »

Thanks
Post Reply