Created
September 22, 2010 04:40
-
-
Save kevinsmith/591155 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
| Helps determine which settings to use based on the current server. | |
| Add this to the top of the constants.php file just under the | |
| opening php tag and copy it over everything down to just above | |
| the 'File Stream Modes' section. Modify the switches below as | |
| needed, and add as many switches as your setup requires. | |
*/ | |
switch($_SERVER['HTTP_HOST']) | |
{ | |
case 'example1.com': | |
case 'www.example1.com': | |
define('SITE', 'live'); | |
break; | |
case 'example1.dev': | |
case 'www.example1.dev': | |
define('SITE', 'expressionengine'); | |
break; | |
default: | |
define('SITE', 'live'); | |
break; | |
} | |
/* | |
|-------------------------------------------------------------------------- | |
| File and Directory Modes | |
|-------------------------------------------------------------------------- | |
| | |
| These prefs are used when checking and setting modes when working | |
| with the file system. The defaults are fine on servers with proper | |
| security, but you may wish (or even need) to change the values in | |
| certain environments (Apache running a separate process for each | |
| user, PHP under CGI with Apache suEXEC, etc.). Octal values should | |
| always be used to set the mode correctly. | |
| | |
*/ | |
if (SITE === 'dev') | |
{ | |
define('FILE_READ_MODE', 0644); | |
define('FILE_WRITE_MODE', 0666); | |
define('DIR_READ_MODE', 0755); | |
define('DIR_WRITE_MODE', 0777); | |
} | |
else | |
{ | |
// This is for a live server in a suPHP environment. In a standard | |
// server setup, use the settings recommended in the EE installation | |
// guide. | |
define('FILE_READ_MODE', 0644); | |
define('FILE_WRITE_MODE', 0644); | |
define('DIR_READ_MODE', 0755); | |
define('DIR_WRITE_MODE', 0755); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Changed 'dev' to 'expressionengine' to make it possible to perform upgrades locally.