cmc-sales/app/config/core.php
2025-08-18 21:10:33 +10:00

211 lines
6.1 KiB
PHP

<?php
error_reporting(E_ALL & ~E_STRICT & ~E_DEPRECATED);
/* 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.
*/
Configure::write('debug', 0);
Configure::write('version', '1.0.1');
$host = $_SERVER['HTTP_HOST'];
/*Configure::write('smtp_settings', array(
'port' => '587',
'timeout' => '60',
'host' => 'smtp-relay.gmail.com',
'username' => 'sales',
'password' => 'S%s\'mMZ})MGsg$k!5N|mPSQ>}'
));
*/
Configure::write('smtp_settings', array(
'port' => '25',
'timeout' => '30',
'host' => '172.17.0.1'));
// Mailhog SMTP settings for local development
// Configure::write('smtp_settings', array(
// 'port' => '1025',
// 'timeout' => '30',
// 'host' => 'host.docker.internal'
// ));
//Production/Staging Config
$production_hosts = array('cmc.lan', '192.168.0.7', 'cmcbeta.lan', 'office.cmctechnologies.com.au:5000');
$basedir = '/var/www/cmc-sales/app/';
Cache::config('default', array(
'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,
));
Configure::write('email_directory', '/var/www/emails');
Configure::write('pdf_directory', $basedir.'/webroot/pdf/');
Configure::write('attachments_directory', $basedir.'/webroot/attachments_files/');
/**
* Application wide charset encoding
*/
Configure::write('App.encoding', 'UTF-8');
/**
* Turn off all caching application-wide.
*
*/
Configure::write('Cache.disable', true);
/**
* Defines the default error type when using the log() function. Used for
* differentiating error logging and debugging. Currently PHP supports LOG_DEBUG.
*/
define('LOG_ERROR', 1);
/**
* 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');
/**
* The classname and database used in CakePHP's
* access control lists.
*/
Configure::write('Acl.classname', 'DbAcl');
Configure::write('Acl.database', 'default');
/**
* 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');