Jump to:

17452 Posts in 4473 Topics by 1971 members


SilverStripe Forums » Archive » Advice on the best _config.php setup?

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

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

Page: 1
Go to End
Author Topic: 1279 Views
  • 3dkiwi
    Community Member
    17 Posts

    Advice on the best _config.php setup? Link to this post


    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
    // http://doc.silverstripe.com/doku.php?id=devmode
    // 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?


Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.