Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

php error tracking

Tags:

php

tracking

i am using php and mysql for my projects with pear package.

i want to track bugs in my programs .

is there any way to track a bug in pear package or php5.

suppose in my program any error or warning is generate then i want to track this error and

store into database.

any one have idea about it.

thanks in advance.

like image 765
Sanjay Khatri Avatar asked Aug 25 '26 00:08

Sanjay Khatri


1 Answers

Do not store errors in the database. many errors are database related itself. what would you do with it?

PHP already have everything you want. just turn on log_errors ini directive and, optionally, error_log one to specify certain log file instead of placing PHP errors in the web-server's log file

Also you may find useful a trigger_error() function which could bring a custom message to the standard error output, e.g

mysql_error($sql);
if(!$sql) trigger_error(mysql_error()." in ".$sql);
like image 135
Your Common Sense Avatar answered Aug 26 '26 14:08

Your Common Sense



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!