Hi all. I have this file located in / (root of my website) :
<?
require_once './includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
global $user; print_r($user); $page = "io sono la pagina"; echo theme('page',$page); ?>
And this page works like without problem (the output is my "user" data).
Now I have this page located in /subdir1 (of my website):
<? chdir(".."); require_once './includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
global $user; print_r($user); $page = "io sono la pagina"; echo theme('page',$page);
?>
But this page does not work like I expect it: the user is anonymous and not my "user logged in". Why this ? Note the the only different is "chdir('..');"
Tnx.
After hours and hours I have find this comment http://drupal.org//node/166368#comment-268992 that seems solved my problem (for the moment).
M.
Quoting Davide Michel 'ZioBudda' Morelli michel@ziobudda.net:
After hours and hours I have find this comment http://drupal.org//node/166368#comment-268992 that seems solved my problem (for the moment).
Thanks for the update. Now we can both help the next person. ;D
Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/