I've been using the WP integration posted here by duncan from codeistry for years with no problems but today when I updated a site to Evo 1.0.15 WP now gives me this error:
Could not load DBAPI class.
Any ideas?
Here is the code I'm using in my WP theme:
define('MODX_BASE_PATH', dirname(dirname(dirname(dirname(dirname(__FILE__))))) . '/');
//define("IN_ETOMITE_PARSER", "true"); // provides compatibility with etomite 0.6 and maybe later versions
define("IN_PARSER_MODE", "true");
define("IN_MANAGER_MODE", "false");
if (!defined('MODX_API_MODE')) {
define('MODX_API_MODE', true);
}
// initialize the variables prior to grabbing the config file
$GLOBALS['database_type'] = 'mysql';
$GLOBALS['database_server'] = 'mysql.xxx.com';
$GLOBALS['database_user'] = 'xxx';
$GLOBALS['database_password'] = 'xxx';
$GLOBALS['dbase'] = 'xxx_modx';
$GLOBALS['table_prefix'] = 'modx_';
$GLOBALS['base_url'] = 'http://www.xxx.com/';
$GLOBALS['base_path'] = '/home/xxx/xxx/';
define('MODX_BASE_URL', $GLOBALS['base_url']);
define('MODX_SITE_URL', $GLOBALS['base_url']);
$ipath = ini_get('include_path');
ini_set('include_path', $ipath . ':' . $GLOBALS['base_path']);
// initiate a new document parser
include_once($GLOBALS['base_path'].'manager/includes/document.parser.class.inc.php');
$GLOBALS['modx'] = new DocumentParser;
$modx =& $GLOBALS['modx'];
$etomite = &$GLOBALS['modx']; // for backward compatibility
// set some parser options
$modx->minParserPasses = 1; // min number of parser recursive loops or passes
$modx->maxParserPasses = 10; // max number of parser recursive loops or passes
$modx->dumpSQL = false;
$modx->dumpSnippets = false; // feed the parser the execution start time
$modx->tstart = $tstart;
$modx->getSettings();
$modx->documentMethod = 'id';
$modx->documentIdentifier = 8; // modx page ID that links to wordpress