Hi, I am using pmapper-4.2 and want to password protect access to maps. What I am trying to do is: login into a drupal site and then access pmapper if and only if the user is logged into drupal.
So I putted this code snippet at the top of map_default.phtml define('DRUPAL_ROOT', '/path/to/drupal'); require_once DRUPAL_ROOT . '/includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); global $user; then I check user status on $user. The problem is, it works at map_default.phtml level but the viewport is empty, I guess it's a path/cwd problem because apache error log reports several includes errors as follows: PHP Warning: require_once(/common.php): failed to open stream: No such file or directory in /var/www/pmapper-4.2.0/incphp/js/js_session.php on line 7, referer: http://example.com/map_default.phtml?config=default PHP Stack trace:, referer: http://example.com/map_default.phtml?config=default PHP 1. {main}() /var/www/pmapper-4.2.0/incphp/js/js_session.php:0, referer: http://example.com/map_default.phtml?config=default PHP Fatal error: require_once(): Failed opening required '/common.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/pmapper-4.2.0/incphp/js/js_session.php on line 7, referer: http://example.com/map_default.phtml?config=default PHP Stack trace:, referer: http://example.com/map_default.phtml?config=default PHP 1. {main}() /var/www/pmapper-4.2.0/incphp/js/js_session.php:0, referer: http://example.com/map_default.phtml?config=default PHP Warning: require_once(/globals.php): failed to open stream: No such file or directory in /var/www/pmapper-4.2.0/config/default/js_config.php on line 5, referer: http://example.com/map_default.phtml?config=default PHP Stack trace:, referer: http://example.com/map_default.phtml?config=default PHP 1. {main}() /var/www/pmapper-4.2.0/config/default/js_config.php:0, referer: http://example.com/map_default.phtml?config=default PHP Fatal error: require_once(): Failed opening required '/globals.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/pmapper-4.2.0/config/default/js_config.php on line 5, referer: http://example.com/map_default.phtml?config=default PHP Stack trace:, referer: http://example.com/map_default.phtml?config=default PHP 1. {main}() /var/www/pmapper-4.2.0/config/default/js_config.php:0, referer: http://example.com/map_default.phtml?config=default Any idea on how to workaround this issue? Or I am doing something wrong to PMapper session variables? regards -r ------------------------------------------------------------------------------ Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb _______________________________________________ pmapper-users mailing list pmapper-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pmapper-users