cmc-sales/php/app/config/core.php

198 lines
6 KiB
PHP
Raw Normal View History

2015-06-01 07:02:33 -07:00
<?php
error_reporting(E_ALL & ~E_STRICT & ~E_DEPRECATED);
2015-06-01 07:02:33 -07:00
/* SVN FILE: $Id: core.php 7296 2008-06-27 09:09:03Z gwoo $ */
/**
* This is core configuration file.
*
* Use it to configure core behavior of Cake.
*
* PHP versions 4 and 5
*
* CakePHP(tm) : Rapid Development Framework <http://www.cakephp.org/>
* Copyright 2005-2008, Cake Software Foundation, Inc.
* 1785 E. Sahara Avenue, Suite 490-204
* Las Vegas, Nevada 89104
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @filesource
* @copyright Copyright 2005-2008, Cake Software Foundation, Inc.
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
* @package cake
* @subpackage cake.app.config
* @since CakePHP(tm) v 0.2.9
* @version $Revision: 7296 $
* @modifiedby $LastChangedBy: gwoo $
* @lastmodified $Date: 2008-06-27 02:09:03 -0700 (Fri, 27 Jun 2008) $
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
/**
* CakePHP Debug Level:
*
* Production Mode:
* 0: No error messages, errors, or warnings shown. Flash messages redirect.
*
* Development Mode:
* 1: Errors and warnings shown, model caches refreshed, flash messages halted.
* 2: As in 1, but also with full debug messages and SQL output.
* 3: As in 2, but also with full controller dump.
*
* In production mode, flash messages redirect after a time interval.
* In development mode, you need to click the flash message to continue.
*/
2025-08-12 04:30:43 -07:00
Configure::write('debug', 0);
2015-06-01 07:02:33 -07:00
2016-05-06 22:27:45 -07:00
Configure::write('version', '1.0.1');
2015-06-01 07:02:33 -07:00
$host = $_SERVER['HTTP_HOST'];
2025-08-22 02:38:13 -07:00
2025-09-13 05:40:19 -07:00
// SMTP settings
Configure::write('smtp_settings', array(
2025-08-22 02:38:13 -07:00
'port' => '25',
'timeout' => '30',
2025-09-13 05:40:19 -07:00
'host' => 'postfix'
2025-08-22 02:38:13 -07:00
));
2016-05-17 06:46:21 -07:00
//Production/Staging Config
2017-10-27 01:48:00 -07:00
2017-10-27 01:50:41 -07:00
$production_hosts = array('cmc.lan', '192.168.0.7', 'cmcbeta.lan', 'office.cmctechnologies.com.au:5000');
2017-10-27 01:48:00 -07:00
2019-04-06 04:16:13 -07:00
2015-06-01 07:02:33 -07:00
$basedir = '/var/www/cmc-sales/app/';
Cache::config('default', array(
2025-08-10 22:50:32 -07:00
'engine' => 'File', //[required]
'duration'=> 3600, //[optional]
'probability'=> 100, //[optional]
'path' => '/home/cmc/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,
));
2015-06-01 07:02:33 -07:00
2019-06-28 22:06:45 -07:00
Configure::write('email_directory', '/var/www/emails');
2025-11-24 19:06:24 -08:00
Configure::write('pdf_directory', $basedir.'webroot/pdf/');
Configure::write('attachments_directory', $basedir.'webroot/attachments_files/');
2015-06-01 07:02:33 -07:00
/**
* Application wide charset encoding
*/
Configure::write('App.encoding', 'UTF-8');
/**
* Turn off all caching application-wide.
*
*/
Configure::write('Cache.disable', true);
2015-06-01 07:02:33 -07:00
/**
* Defines the default error type when using the log() function. Used for
* differentiating error logging and debugging. Currently PHP supports LOG_DEBUG.
*/
2016-04-29 20:02:57 -07:00
define('LOG_ERROR', 1);
2015-06-01 07:02:33 -07:00
/**
* The preferred session handling method. Valid values:
*
* 'php' Uses settings defined in your php.ini.
* 'cake' Saves session files in CakePHP's /tmp directory.
* 'database' Uses CakePHP's database sessions.
*
* To define a custom session handler, save it at /app/config/<name>.php.
* Set the value of 'Session.save' to <name> to utilize it in CakePHP.
*
* To use database sessions, execute the SQL file found at /app/config/sql/sessions.sql.
*
*/
Configure::write('Session.save', 'database');
/**
* The name of the table used to store CakePHP database sessions.
*
* 'Session.save' must be set to 'database' in order to utilize this constant.
*
* The table name set here should *not* include any table prefix defined elsewhere.
*/
Configure::write('Session.table', 'cake_sessions');
/**
* The DATABASE_CONFIG::$var to use for database session handling.
*
* 'Session.save' must be set to 'database' in order to utilize this constant.
*/
Configure::write('Session.database', 'default');
/**
* The name of CakePHP's session cookie.
*/
Configure::write('Session.cookie', 'QUOTENIK');
/**
* Session time out time (in seconds).
* Actual value depends on 'Security.level' setting.
*/
Configure::write('Session.timeout', '324');
/**
* If set to false, sessions are not automatically started.
*/
Configure::write('Session.start', true);
/**
* When set to false, HTTP_USER_AGENT will not be checked
* in the session
*/
Configure::write('Session.checkAgent', true);
/**
* The level of CakePHP security. The session timeout time defined
* in 'Session.timeout' is multiplied according to the settings here.
* Valid values:
*
* 'high' Session timeout in 'Session.timeout' x 10
* 'medium' Session timeout in 'Session.timeout' x 100
* 'low' Session timeout in 'Session.timeout' x 300
*
* CakePHP session IDs are also regenerated between requests if
* 'Security.level' is set to 'high'.
*/
Configure::write('Security.level', 'medium');
/**
* A random string used in security hashing methods.
*/
Configure::write('Security.salt', 'uiPxR3MzVXAID5zucbxLdxP4TX33buPoCWZr4JfroGoaE57UQC');
2015-06-01 07:02:33 -07:00
/**
* The classname and database used in CakePHP's
* access control lists.
*/
Configure::write('Acl.classname', 'DbAcl');
Configure::write('Acl.database', 'default');
2025-08-18 04:10:33 -07:00
/**
* Tailscale Authentication Configuration
*
* Enable Tailscale HTTP header authentication support
* When enabled, the system will check for Tailscale authentication headers
* before falling back to HTTP Basic Auth
*/
Configure::write('Tailscale.enabled', true);
/**
* Auto-create users from Tailscale authentication
* When enabled, users authenticated via Tailscale headers will be
* automatically created if they don't exist in the database
*/
Configure::write('Tailscale.autoCreateUsers', false);
/**
* Default access level for auto-created Tailscale users
* Options: 'user', 'manager', 'admin'
*/
Configure::write('Tailscale.defaultAccessLevel', 'user');
2025-11-25 12:23:19 -08:00
/**
* Set timezone to Australian Eastern Time
* This handles both AEST and AEDT (daylight saving) automatically
*/
date_default_timezone_set('Australia/Sydney');