Re: error warning while connecting to posgreSQL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Nilesh Govindrajan wrote:
Yeah that's true. Placing an @ before the function is a bad idea. Instead use error_reporting(E_NONE) OR error_reporting(0)

You should never use error_reporting(E_NONE), not even in production mode. The correct options are:

error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', false);
ini_set('log_errors', true);
ini_set('error_log', '/path/to/error.log');

While development, set display_errors to true and all errors should be output to screen. When moved to production, set display_errors to false, but continue to log any error/warning/notice into the error.log. You shouldn't get anything in there anyway, if your application is bug free (hehe, we wish). This way, you have a little bit of flexibility in debugging a problem that might appear.

Adrian

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux