PHP/Doctrine bootstrap for review Here's my bootstrap.php for my PHP/MySQL/Doctrine app.  It's my first PHP app so I'm interested in learning from the experience of others how this could be improved - security-wise, performance-wise, or otherwise.

//-------------------------------------------------------------------------
// Define global constants
define('ROOT_PATH', dirname(__FILE__) . '/');
define('URL_BASE', 'http://localhost/myapp/public/');
define('LIB_PATH', 'C:\\wamp\\www\\lib\\');
define('OPENID_PATH', 'C:\\wamp\www\\lib\\lightopenid.git\\openid.php');

//-------------------------------------------------------------------------
// Bootstrap Doctrine.php, register autoloader, specify
// configuration attributes and load models.
require_once(LIB_PATH . 'doctrine12/lib/Doctrine.php');
spl_autoload_register(array('Doctrine', 'autoload'));
$manager = Doctrine_Manager::getInstance();

//-------------------------------------------------------------------------
// Define database connection
$dsn = 'mysql:dbname=mydb;host=127.0.0.1';
$user = 'xxx';
$password = 'yyy';
$dbh = new PDO($dsn, $user, $password);
$conn = Doctrine_Manager::connection($dbh);

//-------------------------------------------------------------------------
// Set defaults
$manager-&gt;setAttribute(Doctrine::ATTR_DEFAULT_COLUMN_OPTIONS,
  array('type' =&gt; 'string', 'length' =&gt; 255, 'notnull' =&gt; true));
$conn-&gt;setAttribute(Doctrine_Core::ATTR_QUOTE_IDENTIFIER, true);
$manager-&gt;setAttribute(Doctrine_Core::ATTR_AUTO_ACCESSOR_OVERRIDE, true);
// Don't load a model until it's needed (causes problems when this is on)
//$manager-&gt;setAttribute(Doctrine_Core::ATTR_MODEL_LOADING, Doctrine_Core::MODEL_LOADING_CONSERVATIVE);

//-------------------------------------------------------------------------
// Import model objects
Doctrine_Core::loadModels(ROOT_PATH . 'app/models/generated'); // have to load base classes first
Doctrine_Core::loadModels(ROOT_PATH . 'app/models');
Here are a few lines that might be useful to add if you would like to use these options:

/**
 * Needed for SoftDelete to work
 */
$manager-&gt;setAttribute(Doctrine::ATTR_USE_DQL_CALLBACKS, true);

/**
 * Tell doctrine to look for custom ___Table classes in the models folder
 */
$manager-&gt;setAttribute(Doctrine::ATTR_AUTOLOAD_TABLE_CLASSES, true);