Fixed core config

This commit is contained in:
Karl Cordes 2013-04-03 19:47:33 +11:00
parent 0c5df3f940
commit 381da05da4

View file

@ -45,32 +45,62 @@ Configure::write('debug', 0);
$host = $_SERVER['HTTP_HOST'];
die(print_r($host));
die($host));
//Production Config
if($host == 'cmc.lan') {
$basedir = '/var/www/cakephp/app';
$basedir = '/var/www/CMC-Sales/app';
Configure::write('email_directory', '/var/www/cakephp/app/emails');
Configure::write('pdf_directory', $basedir.'/webroot/pdf/');
Configure::write('attachments_directory', $basedir.'/webroot/attachments_files/');
Configure::write('pdf_directory', '/var/www/cakephp/app/webroot/pdf/');
Configure::write('attachments_directory', '/var/www/cakephp/app/webroot/attachments_files/');
Configure::write('smtp_settings', array(
'port' => '25',
'timeout' => '30',
'host' => '192.168.0.8',
'username' => 'sales',
'password' => '2seng33+02'));
Cache::config('default', array(
'engine' => 'Apc', //[required]
'duration'=> 3600, //[optional]
'probability'=> 100, //[optional]
'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
));
}
else { //Staging config
$basedir = '/home/karlcordes/CMC-Sales/app/';
Configure::write('smtp_settings', array(
'port' => '1025',
'timeout' => '30',
'host' => 'localhost'));
/**
*
* Cache Engine Configuration
* Default settings provided below
*
* File storage engine.
*/
Cache::config('default', array(
'engine' => 'File', //[required]
'duration'=> 3600, //[optional]
'probability'=> 100, //[optional]
'path' => '/Users/karlcordes/CMC-Sales/app/tmp/', //[optional] use system tmp directory - remember to use absolute path
'prefix' => 'cake_', //[optional] prefix every cache file with this string
'lock' => false, //[optional] use file locking
'serialize' => true,
));
}
@ -209,30 +239,15 @@ Configure::write('Security.salt', 'uiPxR3MzVXAID5zucbxLdxP4TX33buPoCWZr4JfroGoaE
*/
Configure::write('Acl.classname', 'DbAcl');
Configure::write('Acl.database', 'default');
/**
*
* Cache Engine Configuration
* Default settings provided below
*
* File storage engine.
*/
Cache::config('default', array(
'engine' => 'File', //[required]
'duration'=> 3600, //[optional]
'probability'=> 100, //[optional]
'path' => '/Users/karlcordes/CMC-Sales/app/tmp/', //[optional] use system tmp directory - remember to use absolute path
'prefix' => 'cake_', //[optional] prefix every cache file with this string
'lock' => false, //[optional] use file locking
'serialize' => true,
));
/*
*
*
*
*
*/
*
*
*
*
*/
//APC (http://pecl.php.net/package/APC)
/*Cache::config('default', array(
@ -242,18 +257,18 @@ Cache::config('default', array(
'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
)); */
/*
*
*
*
*
// Xcache (http://xcache.lighttpd.net/)
*/
*/
/* Cache::config('default', array(
'engine' => 'Xcache', //[required]
'duration'=> 3600, //[optional]
'probability'=> 100, //[optional]
'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
'user' => 'user', //user from xcache.admin.user settings
'password' => 'password', //plaintext password (xcache.admin.pass)
)); */
'duration'=> 3600, //[optional]
'probability'=> 100, //[optional]
'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
'user' => 'user', //user from xcache.admin.user settings
'password' => 'password', //plaintext password (xcache.admin.pass)
)); */
/*
*
* Memcache (http://www.danga.com/memcached/)
@ -269,5 +284,5 @@ Cache::config('default', array(
* 'compress' => false, // [optional] compress data in Memcache (slower, but uses less memory)
* ));
*
*/
*/
?>