On Tue, 2007-06-05 at 11:07 -0400, tedd wrote: > 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: > >> > >> I 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.php > > > >So 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 :) > > 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? Yeah, that's in my config file ;) But, for clarity's sake I more often than not separate my dev and live configs. Then if I want to compare them I can use the diff command to see what's different between them. Can't say I ever use the session since it could only apply after some kind of authentication and not all pages require authentication. Cheers, Rob. -- .------------------------------------------------------------. | InterJinn Application Framework - http://www.interjinn.com | :------------------------------------------------------------: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `------------------------------------------------------------' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php