By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,271 Members | 1,319 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,271 IT Pros & Developers. It's quick & easy.

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

P: 3
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
Share this Question
Share on Google+
1 Reply

Expert 5K+
P: 5,821
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.