<?xml version="1.0"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Forum posts to 'Archive'</title>
		<link>http://www.silverstripe.org/archive/rss</link>
		<atom:link href="http://www.silverstripe.org/archive/rss" rel="self" type="application/rss+xml" />
		<description></description>

		
		<item>
			<title>Advice on the best _config.php setup?</title>
			<link>http://www.silverstripe.org/archive/show/54851#post54851</link>
			<description>&lt;p&gt;Guys&lt;/p&gt;&lt;p&gt;Hopefully not a too difficult one for a stunning autumn Thursday...&lt;/p&gt;&lt;p&gt;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.&lt;/p&gt;&lt;p&gt;My main issue is that if I remove the Director::set_dev_servers directive as suggested in the devmode page&lt;br /&gt;ie as below:&lt;/p&gt;&lt;p&gt;xxx&lt;br /&gt;// Sites running on the following servers will be&lt;br /&gt;// run in development mode. See&lt;br /&gt;// &lt;a href=&quot;http://doc.silverstripe.com/doku.php?id=devmode&quot;&gt;http://doc.silverstripe.com/doku.php?id=devmode&lt;/a&gt;&lt;br /&gt;// for a description of what dev mode does.&lt;br /&gt;//Director::set_dev_servers(array(&lt;br /&gt;// '127.0.01',&lt;br /&gt;// 'localhost'&lt;br /&gt;//));&lt;/p&gt;&lt;p&gt;Director::set_environment_type(&quot;live&quot;);&lt;br /&gt;xxx&lt;/p&gt;&lt;p&gt;I get the following error repeated multiple times in the Apache logfile:&lt;/p&gt;&lt;p&gt;PHP Notice:  Undefined index:  HTTP_HOST in .../sapphire/core/control/Director.php on line 482&lt;/p&gt;&lt;p&gt;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&lt;/p&gt;&lt;p&gt;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.&lt;/p&gt;&lt;p&gt;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?&lt;/p&gt;&lt;p&gt;Cheers&lt;br /&gt;Jim&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Advice on the best _config.php setup? &lt;a href=&quot;http://www.silverstripe.org/archive/show/54851#post54851&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/archive/show/54851#post54851&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Thu, 10 Apr 2008 11:41:30 +1200</pubDate>
			<dc:creator>3dkiwi</dc:creator>
			<guid>http://www.silverstripe.org/archive/show/54851#post54851</guid>
		</item>
		

	</channel>
</rss>