I'm trying to load WordPress from my application using:
define('WP_USE_THEMES', false);
require( dirname(__FILE__) . '/wp-blog-header.php' );
but I'm getting an error with $wpdb being undefined when it reaches is_blog_installed in functions.php
If I var_dump $wpdb in wp_settings.php just before the call, $wpdb is ok.
Inside functions.php, even though the is_blog_installed has global $wpdb at the beginning, the variable is null - causing execution to exit.
Any idea what I might be doing wrong?