Re: error warning while connecting to posgreSQL
| From: | Adrian Videnie | Date: | Tue, 30 Sep 2008 09:09:17 +0000 |
| Subject: | Re: error warning while connecting to posgreSQL | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-281152@lists.php.net to get a copy of this message | ||
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