Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Advice on the best _config.php setup?

Go to End



Community Member, 18 Posts

10 April 2008 at 11:41am


Hopefully not a too difficult one for a stunning autumn Thursday...

I have read and reread the devmode, debug and other pages on the wiki and am not totally sure of the correct/best setup of the _config.php file for a live site.

My main issue is that if I remove the Director::set_dev_servers directive as suggested in the devmode page
ie as below:

// Sites running on the following servers will be
// run in development mode. See
// for a description of what dev mode does.
// '127.0.01',
// 'localhost'


I get the following error repeated multiple times in the Apache logfile:

PHP Notice: Undefined index: HTTP_HOST in .../sapphire/core/control/Director.php on line 482

This message also is reported on lines 487, 224 of the Director.php and on line line 29 of .../sapphire/core/control/RootURL/Controller.php

I thought setting the Director::set_evironment_type() to live might override the use of the set_dev_servers() but it does not seem to.

Any thoughts on what a secure, working _config.php should look like for a live (internet facing) site that does not fill the apache logfiles with PHP errors?