Guest joanging Posted March 8, 2006 Share Posted March 8, 2006 I just installed 3.0.9 on two different Unix environments (though at this point I do not know what is different). One worked perfectly using the automated setup. The other, however, is not working properly. I've discovered the problem. When I try to go to the admin section, the forward to the login page is not working properly. Upon further testing, I've discoverd that though I have all the values set properly in globals.inc.php, the $GLOBALS['rootRel'] variable in the auth.inc.php file has no value (and thus is not forwarding to the proper directory). Does anyone know why this might work on one system and not another, or why this variable is producing no value? Help is appreciated. Joan Additional Info: I did just discover that one server is on php4 and the other is php5. Does $GLOBALS work differently between PHP versions, and if so, is there an easy/fast workaround? Quote Link to comment Share on other sites More sharing options...
Guest joanging Posted March 9, 2006 Share Posted March 9, 2006 Does no one have an answer to this or is there something I need to clarify in the situation? This is preventing me from being able to use the software at the moment, so ANY ideas or suggestions would help me a great deal. Thanks, Joan Quote Link to comment Share on other sites More sharing options...
Guest joanging Posted March 10, 2006 Share Posted March 10, 2006 Well, I finally solved the problem in a horrible workaround. In many files (admin/includes/auth.inc.php as an example), I've had to manually set the $GLOBALS value at the top of the file like so: $GLOBALS['rootDir'] = '/path/to/store/; $GLOBALS['rootRel'] = '/store/'; $GLOBALS['storeURL'] = 'http://www.mysite.com/store/'; It was the only way I could get those variables to work properly throughout the rest of the script. Quote Link to comment Share on other sites More sharing options...
Guest Posted March 10, 2006 Share Posted March 10, 2006 Well, I finally solved the problem in a horrible workaround. In many files (admin/includes/auth.inc.php as an example), I've had to manually set the $GLOBALS value at the top of the file like so: $GLOBALS['rootDir'] = '/path/to/store/; $GLOBALS['rootRel'] = '/store/'; $GLOBALS['storeURL'] = 'http://www.mysite.com/store/'; It was the only way I could get those variables to work properly throughout the rest of the script. Well I'm not running 3.09 or PHP 5, but in my installation, $GLOBALS['rootDir'], $GLOBALS['storeURL'] , and $GLOBALS['rootRel'] are all set in includes/sslSwitch.inc.php (depending upon whether you're using SSL or not). The script checks that $_SERVER["HTTPS"] is set and equals "on" before deciding what to make those three variables. So it should use the SSL config values if you access the page via https and the regular ones if not. One thing that looks odd to me is that it checks whether $_SERVER["HTTPS"] == "on". I thought it this was just set to a positive value when you use https, not specifically to "on". Maybe this is different in PHP 5? PHP 5 also has register_globals OFF by default. This is a huge improvement in security, but it can cause some headaches. This also may have something to do with what happened to you. I would play with the code in includes/sslSwitch.inc.php a bit and see what you can figure out. You could output the values at that point and see where the script is failing. Once it sets those values correctly there it should work throughout. Please post anything that you learn so that the next person doesn't have to go through what you are. Quote Link to comment Share on other sites More sharing options...
Guest Posted March 11, 2006 Share Posted March 11, 2006 Hmm... Another possible source of this problem is in includes/functions.inc.php. There it sets $storeURL and $storeURL_SSL, but as far as I can tell it doesn't make them global in scope and it's doing this inside a function. So that looks odd to me and I could see how it might not work with register_globals off. Anyone more familiar than I am with this script want to confirm/deny my suspicions? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.