Hi,
I have installed a drupal site in a folder inside my main website. (www.mysite.com/drupal) , People Need to login before they can access anything in side www.mysite.com and uses session variables for that. The problem is the drupal that i installed does not receive / could not retrieve session variables from the login form of www.mysite.com .
Is there a way to pass the session variables from www.mysite.com to www.mysite.com/drupal?
example is that i have created a file called test.php (www.mysite.com/drupal/test.php) , and it is showing all the session variables from the www.mysite.com , but when i opened www.mysite.com/drupal/ only it does not show any session variable from www.mysite.com
Thanks.
Comments
How to use Global Session Variables from Drupal in out scripts.
Firsts at all, I'm sorry for my little english.
I'd the same problem and I found the solution in the next url: http://drupal.org/node/258208
You must be include the next lines in your script for activate the session variables defined in Drupal. Drupal not use the tipycal configuration to manipulate de Global Session, Drupal define de Global Session in the Database. For this case, if you use the typical function (session_start(), $SESSION['variable'], etc) your script don't know the Drupal values because is not declared for this procedure.
The lines that you must be include are (Remember!!!, put your php script in the main Drupal folder where index.php lives):
With drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); load the Full specitification and values. If you only need the Session Values you can be change this line to drupal_bootstrap(DRUPAL_BOOTSTRAP_SESSION);
Thank you for the all people that contributed in Drupal Project.