469,647 Members | 1,682 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,647 developers. It's quick & easy.

i want to get all errors occured of php & mssql database through email

can any one help me about the following issues.

i m working in a web based ERP implementation team. some time php & mssql generates different types of errors. some time user reports errors to IT. without understanding the exact reason why the error occured.

so i want to get an email regular basis when an error will occured in php & mssql during surfing over the net. this email will be error reporting mail which will inform about latest errors occured during script execution.

i need assistance ...

best regards...
Jul 11 '07 #1
1 1345
pbmods
5,821 Expert 4TB
Heya, riyadh81.

I take it you want a periodic digest, and not a separate email every time someone runs a query, right?

If you're using a DAL, this becomes very easy, since all your database code is executed in one place. Otherwise, you'll have to find every single SQL query and process it.

Simply create a file logger class that logs the query, as well as the error (if any) to a file. Activate this class every time your script performs an SQL query.

Then set up a cron script that emails the file, and set it to execute once per {period}.
Jul 11 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by bigoxygen | last post: by
4 posts views Thread by Sean C. | last post: by
16 posts views Thread by davemateer | last post: by
9 posts views Thread by Advo | last post: by
8 posts views Thread by php-taz | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.