Body: <p>I have a problem with multi-environment variables.
  I have used this before on a site and it worked perfectly, but now I'm on a different host and it seems that my SERVER_NAME isn't checked.
  Every setting I put in the '*' => array is working fine, but in the 'domain.com' => array, it doesn't work at all.
  It's like the domain isn't checked upon and I have no clue what this could be as I use the exact same code that worked on my previous host for another site.
  I also did a test to check if my SERVER_NAME is correct and it is.</p>
  
  <p>Does anyone have an idea?</p>
  
  <p><strong><em>Config file</em></strong></p>
  
  <pre><code>&lt;?php
  
  return array(
      '*' =&gt; array(
          'omitScriptNameInUrls'  =&gt; true,
          'devMode'               =&gt; true,
          'cache'                 =&gt; false
      ),
  
      'cmgg.buthost.com' =&gt; array( // Use basePath and baseUrl in asset sources
          'environmentVariables' =&gt; array(
              'basePath'              =&gt; '/home/butpanel/public_html/cmgg/public/',
              'baseUrl'               =&gt; 'http://cmgg.buthost.com/',
          ),
  
          'siteUrl' =&gt; array(
              'nl' =&gt; 'http://cmgg.buthost.com/nl/',
              'fr' =&gt; 'http://cmgg.buthost.com/fr/',
              'en' =&gt; 'http://cmgg.buthost.com/en/'
          ),
      ),
  );
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-05-22T19:29:25.410Z
Comments.Text: Can you share the config array you're using?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-05-26T07:42:43.203Z
Comments.Text: Edited the original post with the config as is.
Comments.UserDisplayName: Tom De Smet
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-05-26T15:40:56.800Z
Comments.Text: You've verified that `$_SERVER['SERVER_NAME']` is outputting `cmgg.buthost.com`?  Are you overriding http://buildwithcraft.com/docs/php-constants#craft-environment anywhere?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-05-26T15:43:51.743Z
Comments.Text: I triple checked the server name. Nothing wrong there. I didn't overwrite the craft environment constant either.
Comments.UserDisplayName: Tom De Smet
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-05-26T15:45:27.587Z
Comments.Text: Weird... your config file looks O.K. to me, FWIW.
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-05-26T15:51:13.087Z
Comments.Text: Could it be server related? Some setting on my hosting? I've tried with *.buthost.com even with *.com and those didn't work either.
Comments.UserDisplayName: Tom De Smet
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-05-26T15:53:08.277Z
Comments.Text: Wildcards aren't supported there (http://buildwithcraft.com/docs/multi-environment-configs). Just try using `buthost.com` or `.com`.
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-05-26T15:59:12.030Z
Comments.Text: Same issue. It just doesn't work. I don't get it. It's the same code I used before. I can only think that it's something on my hosting but I have no idea what. I'm on goDaddy hosting.
Comments.UserDisplayName: Tom De Smet
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-05-26T16:00:43.523Z
Comments.Text: GoDaddy!! If you want to send some CP/FTP creds over to support@buildwithcraft.com, we can take a stab at it.
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-05-27T12:35:21.097Z
Comments.Text: I'm afraid my boss won't allow me to give out our credentials on our hosting. But the final site needs to be on the clients server so maybe it'll work there. Thanks for your help.
Comments.UserDisplayName: Tom De Smet
Tags: <config><multi-environment>
Title: Multi-environment config SERVER_NAME not working
ThreadText: # Multi-environment config SERVER_NAME not working
  
  (Asked by: username_0 on 2015-05-22)
  
  I have a problem with multi-environment variables.
  I have used this before on a site and it worked perfectly, but now I'm on a different host and it seems that my SERVER\_NAME isn't checked.
  Every setting I put in the '\*' => array is working fine, but in the 'domain.com' => array, it doesn't work at all.
  It's like the domain isn't checked upon and I have no clue what this could be as I use the exact same code that worked on my previous host for another site.
  I also did a test to check if my SERVER\_NAME is correct and it is.
  
  Does anyone have an idea?
  
  ***Config file***
  
  ```
  <?php
  
  return array(
      '*' => array(
          'omitScriptNameInUrls'  => true,
          'devMode'               => true,
          'cache'                 => false
      ),
  
      'cmgg.buthost.com' => array( // Use basePath and baseUrl in asset sources
          'environmentVariables' => array(
              'basePath'              => '/home/butpanel/public_html/cmgg/public/',
              'baseUrl'               => 'http://cmgg.buthost.com/',
          ),
  
          'siteUrl' => array(
              'nl' => 'http://cmgg.buthost.com/nl/',
              'fr' => 'http://cmgg.buthost.com/fr/',
              'en' => 'http://cmgg.buthost.com/en/'
          ),
      ),
  );
  
  ```
  
  **Tags:** config, multi-environment
  
  > **Comments:**
  > **username_1**: Can you share the config array you're using?  
  > **username_0**: Edited the original post with the config as is.  
  > **username_1**: You've verified that `$_SERVER['SERVER_NAME']` is outputting `cmgg.buthost.com`?  Are you overriding http://buildwithcraft.com/docs/php-constants#craft-environment anywhere?  
  > **username_0**: I triple checked the server name. Nothing wrong there. I didn't overwrite the craft environment constant either.  
  > **username_1**: Weird... your config file looks O.K. to me, FWIW.  
  > **username_0**: Could it be server related? Some setting on my hosting? I've tried with *.buthost.com even with *.com and those didn't work either.  
  > **username_1**: Wildcards aren't supported there (http://buildwithcraft.com/docs/multi-environment-configs). Just try using `buthost.com` or `.com`.  
  > **username_0**: Same issue. It just doesn't work. I don't get it. It's the same code I used before. I can only think that it's something on my hosting but I have no idea what. I'm on goDaddy hosting.  
  > **username_1**: GoDaddy!! If you want to send some CP/FTP creds over to support@buildwithcraft.com, we can take a stab at it.  
  > **username_0**: I'm afraid my boss won't allow me to give out our credentials on our hosting. But the final site needs to be on the clients server so maybe it'll work there. Thanks for your help.  
  
  ---
  
  ## 0 answers
  
  