I'm trying to bootstrap drupal from a standalone PHP script at the command line from sites/all/modules/mymodule/mymodule.php.
<?php
chdir('/sandbox/mysite/');
require_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
I'm attempting to run it from the command line, but I get Drupal site-offline when I do (trimmed for brevity):
cd /sandbox/mysite
php sites/all/modules/mymodule/mymodule.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Site off-line | Pressflow</title>
The site is online and works fine from the browser. DRUPAL_BOOTSTRAP_DATABASE is where this fails, since I can bootstrap the DRUPAL_BOOTSTRAP_CONFIGURATION and DRUPAL_BOOTSTRAP_EARLY_PAGE_CACHE phases without a problem. Anyone run into this before? Thanks in advance.