Custom Global Variables in Drupal It is strange that I can't get global variables in Drupal 7 with &drupal_static or $GLOBALS. Eventually $_SESSION['myVar'] successes. Note that to remember to initiate your $_SESSION variables before using them.