Drupal should be embeddable

Drupal 6 is currently not easily embeddable into third-party PHP applications, since bootstrapping alters the environment. Needless to say this is bad bad bad. Here's a fairly comprehensive list of modifications applied (in order of execution):
  • during DRUPAL_BOOTSTRAP_CONFIGURATION:
    • drupal_unset_globals() modifies global variables
    • conf_init() changes the session name
  • during DRUPAL_BOOTSTRAP_SESSION:
    • modifies the session handlers and starts a session
  • during DRUPAL_BOOTSTRAP_LATE_PAGE_CACHE:
    • drupal_page_header() outputs headers
  • during DRUPAL_BOOTSTRAP_FULL:
    • _drupal_bootstrap_full() modifies the error handler, sets a new system locale, and strips slashes from request variables.
To resolve these issues, the integrating code should have the possibility to set a flag that tells Drupal to bootstrap without altering the existing environment.

1 comment:

Website Development in Bangalore said...

Nice blog,today i got a use full information about drupal.
Web Development Company Bangalore | Website Development Bangalore