Display Errors (was thumbs)

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

 



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?

Just opening the idea for discussion.

Cheers,

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
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