// The system queue can persist itself in any of 3 ways:
// 1. by recursively doing an http client request back to RunEvents
// 2. by forking off of a CGI process, and daemonizing the child
// 3. by just being run from the command line
// The following two variables affect the logic of which method to use.
// Possible Values: NULL (for auto-detect), true, false
$CONF["forcePersistableTo"] = NULL;
// Possible Values: NULL (for auto-detect), true, false
$CONF["forceDaemonableTo"] = NULL;
// If you server has a firewall where the remote IP is dispatched to a
// local IP, then enter the local IP here. This will allow the events
// queue to call itself locally instead of using the primary domain.
$CONF["localURL"] = "";
// Define whether to let the system queue run till its dead or give it a
// limit. Set to "1" and the system queue thread will be stopped as soon
// as it tries to restart itsself. See "killOldQueueThreads" example usage
// below.
$CONF["killOldQueueThreads"] = 0;
// Define the time in seconds that a system queue thread can keep running.
// This should be 45 seconds to a minute less then the time that cron
// waits to hit the system.
// If cron hits every 5 minutes, this should be 4 minutes, or 240 seconds.
// If cron hits every minute, this needs to be like 15 seconds.
// If cron hits every hour, this needs to be 59 minutes, or 59*60 seconds
$CONF["killOldQueueThreadsLimit"] = 240;
// Example usage for "killOldQueueThreads" cont'd ...
// If its originating thread is older then the limit below
// Reason: If there are 100 things in the system queue to run that all
// are supposed to run right now, we dont want the system queue to start
// a new thread running them every 5 minutes if the cron runs the system
// queue that often.
//
// An ascii art illistration would look as follows:
//
// Timeline is in minutes:
//
// IF "killOldQueueThreads" = 0:
//
// 0 5 10 15 20 25 30 35 40 45 50
// |-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|
// thread 1: .............................................................
// thread 2: .......................................................
// thread 3: .................................................
// thread 4: ...........................................
// thread 5: .....................................
// thread 6: ...............................
// thread 7: .........................
// thread 8: ...................
// thread 9: .............
// thread 10: .......
//
// IF "killOldQueueThreads" = 1:
//
// 0 5 10 15 20 25 30 35 40 45 50
// |-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|
// thread 1: ......
// thread 2: ......
// thread 3: ......
// thread 4: ......
// thread 5: ......
// thread 6: ......
// thread 7: ......
// thread 8: ......
// thread 9: ......
// thread 10: .......
// --------------------------------------------------------------------------
// IPC SETTINGS (experimental advanced performance settings)
// --------------------------------------------------------------------------
// Please do not enable these unless you are familiar with manually
// administering shared memory on a Unix box. They also do not necessarily
// flush at the appropriate times yet, and will likely break something
// eventually. It is recommended to only enable locale caching since the
// locale data rarely becomes stale and only this setting makes a
// significant impact on performance. See ipcs(1) and ipcrm(1).
// Cache locale object in shared memory (Unix-only)
// Cache hit saves about 0.2 seconds
// Extensions:
// Required: sysvshm
// Optional: sysvsem
$CONF["enableSharedMemoryLocaleCache"] = false;
// Persist admin lookups
// Cache hit saves about 0.02 seconds
// Extensions:
// Required: sysvshm, sysvsem
$CONF["enableSharedMemoryAdminCache"] = false;
$CONF["adminCacheSeconds"] = 300;
// Persist mb_path() cache in shared memory (Unix-only)
// Cache hit saves about 0.02 seconds.
// Extensions:
// Required: sysvshm, sysvsem
$CONF["enableSharedMemoryMBPathCache"] = false;
// --------------------------------------------------------------------------
// SMARTY TEMPLATE SETTINGS
// --------------------------------------------------------------------------
// Define the absolute path where the compiled tpl files will be saved.
// If the directory does not exist, you must create it.
// ** This directory must be chmod 777
$CONF["smarty"]["compileDirectory"] = '/var/lib/plesk-billing/smarty' . DIRECTORY_SEPARATOR . "compile";
// Define the absolute path where the cached tpl files will be saved.
// If the directory does not exist, you must create it.
// ** This directory must be chmod 777
$CONF["smarty"]["cacheDirectory"] = '/var/lib/plesk-billing/smarty' . DIRECTORY_SEPARATOR . "cache";
// Enable smarty template caching:
// Possible Values: true (Not Recommended) or false (Default)
$CONF["smarty"]["enableCaching"] = false;
// If "enableCaching" = "true, set the lifetime (in seconds) of cached
// smarty templates. (1 Default)
$CONF["smarty"]["cacheLifetime"] = 1;
// Enable smarty template compile checking:
// Possible Values: true (Default) or false
$CONF["smarty"]["enableCompileChecking"] = true;
// Enable high security mode in smarty templates. This will stop tpl
// files from executing bad code.
// Possible Values: true (Not Recommended) or false (Default)
$CONF["smarty"]["enableSecurity"] = false;
// Enable smarty template debugging window. Tis will display the SMARTY
// popup window for debugging tpl files.
// Possible Values: true (Debugging Only) or false (Production Mode - Default)
$CONF["smarty"]["enableDebugging"] = false;
// --------------------------------------------------------------------------
// SMARTY TEMPLATE SETTINGS (advanced settings)
// --------------------------------------------------------------------------
// Enable the logging of unknown translation constants in smarty templates.
// Possible Values: true (Internal Use Only) or false (Default)
$CONF["smarty"]["logUnknownConstants"] = false;
// --------------------------------------------------------------------------
// ADDITIONAL SETTINGS - DO NOT CHANGE (advanced settings)
// --------------------------------------------------------------------------
if (!defined("MB_LIBPATH")){
define("MB_LIBPATH", realpath(dirname(__FILE__)."/../../.."));
require_once(MB_LIBPATH."/lib-pkg/parsefunction.php");
}
require mb_path("/lib-billing/include/config/internal/ColumnMap.php");
require mb_path("/lib-billing/include/config/internal/QueryMasterMap.php");
if (substr($CONF["standardURL"], -1)=="/") {
$CONF["standardURL"] = substr($CONF["standardURL"], 0, -1);
}
if (substr($CONF["secureURL"], -1)=="/") {
$CONF["secureURL"] = substr($CONF["secureURL"], 0, -1);
}
$hparts = explode("/", $CONF["standardURL"]);
$CONF["standardHost"] = $hparts[0];
$hparts = explode("/", $CONF["secureURL"]);
$CONF["secureHost"] = $hparts[0];
if ($CONF["secureURLProtocol"]=="http"){
$CONF["relativeWebRoot"] = substr($CONF["standardURL"], strpos($CONF["standardURL"], $CONF["standardHost"])+strlen($CONF["standardHost"]));
} else {
$CONF["relativeWebRoot"] = substr($CONF["secureURL"], strpos($CONF["secureURL"], $CONF["secureHost"])+strlen($CONF["secureHost"]));
}
// set items to try again no sooner than 1 day from time of failure
$CONF["billingAccountShareRetryTime"] = (60*60*24);
define("INVOICE_PROCESS_PACKAGE_LOCK_TIMEOUT", 5*60); // 5 minutes
define("USE_PREDEFINED_RESELLER_VOLUME_DISCOUNTS", 0);
define("RESELLER_VOLUME_PRODUCT_GROUP_API_NAME", "dedicatedservers");
define("DEFAULT_MAXIMUM_DISCOUNT", 100);
define("ENABLE_MBAPI_COMMAND_HOOKS", 0);
define("NUMBER_OF_INVOICES_PER_EVENT", 25);
define("MBACTION_DEFAULT_NUM_RECORDS", 30);
define("MAX_AUTOCOMPLETE_RESULTS", 20);
define("CREATE_PLAINTEXT_PACKAGE_PASSWORD", 0);
define("DEFAULT_CONTACT_EMAIL_FORMAT", 1);
define("PAYMENT_PROCESS_PACKAGE_LOCK_TIMEOUT", 60*60);
define("BILLING_ACCOUNT_RETRY_PUSH_TIME", 60*60*24*7);
// keep this at 0 unless this is a demo.
define('DEMOMODE', 0);
//$CONF["remoteMBAPIURL"] = array_rand((array)$CONF["remoteMBAPIURL"]);
define("ALLOW_DEBUG_LOGGING", false);
$CONF["libDirectory"] = '/var/lib/plesk-billing';