Defined variables losing value after using drupal_bootstrap We're trying to use drupal_bootstrap to be able to delete a drupal user when a user is inactivated in our internal (non-Drupal) system. It appears that all defined variables set prior to the bootstrap call are losing value as soon as the call is made. Here's the weird part: it only happens on our live server - everything runs perfectly on dev. 

Here's the code; I've stuck a whole bunch of error_log statements in so I can see exactly where the variables are disappearing.

//email address is empty; delete institute record - but not if it's user 0 or 1
if($institute_uid &gt; 1) {
  error_log("institute uid right before bootstrapping drupal: $institute_uid"); 
  //previous line prints and the $institute_uid is correct

  //set the working directory to your Drupal root - necessary for delete user function
  chdir('/home/www/institute');

  //require the bootstrap include
  require_once './includes/bootstrap.inc';

  //Load Drupal
  drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); 
  //(loads everything, but doesn't render anything)

  error_log("institute uid immediately after bootstrap = $institute_uid"); 
  //previous line prints but the $institute_uid value is blank

  $test = "123";
  error_log("test = $test");
  //previous line prints and $test value is correct

  user_delete(array(), $institute_uid); //$vuid = institute_uid from new_people
  $body .= '&lt;br /&gt;Institute account deleted';

}


Any ideas? We're new to the bootstrap stuff; maybe there's a server setting, or line in a .ini file somewhere in Drupal that needs to change on our live server?
When "register_globals" is enabled, Drupal unsets all global variables before boostrap.

Disable the "register_globals" option in your live server.