Cupid

goto user:sandbox autoconfig for quickstart instructions.

What is Cupid: Just a name, maybe taking the theme too far?, however if your not having fun your not doing it right. [|Wikipedia] defines: "the personification of love and courtship in general".

Cupid_dev is the current name for the database containing auto-configuration for the lovemachines.

Why: To simplify deployment and maintenance of the production love machine environment across multiple servers. Dev's can continue to use server.local.php or may include the bootstrap.php which will attempt to locate configuration information registered for the URL being called.

Help!, my sandbox is broken: * If you have access to your sandbox, make sure you add/have a file called 'server.local.php' in each app directory (eg: '~/public_html/love' * require_once ~/public_html/bootstrap.php in server.local.php or in each script that processes requests * define(config_key)=data yourself in server.local.php if you'd rather manage changes in a file * IF YOU WANT TO USE THE CUPID DEFAULTS AND JUST OVERRIDE SOME DATA, define your values before calling bootstrap.php

How:[brain dump] - bootstrap.php * php.ini/server.local.php specify connection information to the cupid database. * bootstrap looks for the longest matching domain key in cupid (eg: dev.sendlove.us/~garth/) * requests 'best' matching configuration record for the domain+url, domain, app, default environments: * Set: all records that match 'dev.sendlove.us/~garth/', 'dev.sendlove.us', '/~garth/love/', 'BASE' * Order by: Priority DESC (Higher priority first) * Group by: config_key * Limit: 1 (largest priority for each config_key) * Processes all configuration directives found * DEFSTRING - if(!defined(config_key)) define(config_key,data) * DEBUG - synonym for DEFSTRING but triggers check for DEBUG_CONSOLE * Array - We can't set arrays as defines, so arrays that need to be loaded will be placed in $cupid_arrays[config_key]=unserialize(data) * if debug is triggered * DEBUG_ADDRESS and DEBUG_NETMASK are used to detect if the remote ip address is authorized to do special tasks (DEBUG_CONSOLE=true) * if DEBUG_CONSOLE and DEBUG_DUMP are defined, just before bootstrap goes returns to the calling script, bootstrap dumps the user defined constants and terminates. this is to verify your environment is loading properly.

Default (BASE) values would typically have a priority of 0. During failover or testing, temporarily override settings by adding a BASE or domain matched record with priority set higher than the value currently at maximum (or set priority at 999999). To restore operations to normal, remove the override record.

Current Defaults: