Display Errors (was thumbs)
| From: | tedd | Date: | Tue, 05 Jun 2007 15:07:54 +0000 |
| Subject: | Display Errors (was thumbs) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-256098@lists.php.net to get a copy of this message | ||
At 10:48 AM -0400 6/5/07, Robert Cummings wrote:
On Tue, 2007-06-05 at 16:29 +0200, Zoltán Németh wrote:Just a thought -- wouldn't a simpler solution be just using a global session variable, or constant, such as $production = true or false and then including your error routines accordingly? Just opening the idea for discussion. Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.comI agree with the above idea. Errors should be logged (and possibly sent in notification mail to the developer or something like that), not displayed to the outside world, as they can expose sensitive information about your setup.It however convenient to have errors displayed on the page when doing development. Since I like as many config settings as possible to be attached to the project itself I usually keep at least 3 config files:PROJECT/ configs/ config.live.php config.dev.php config.shared.phpSo config.live and config.dev both include config.shared but set any live or dev specific settings outside of the shared config. Then on any given dev or live server I create a softlink config.php in PROJECT/ that points to either config.live.php or config.dev.php. This way all the configs can live in CVS and they don't step on each other's toes :)