mox22 Posted September 25, 2008 Share Posted September 25, 2008 I am a newbie. I am trying to turn my register global setting to on. I created a php.ini file with the code "register_globals on". I uploaded the file and it did not change anything. I also created a .htaccess file and tried that way but that didn't work either. Any suggestions would be greatly appreciated. Also, here is the php info url if that can help solve the problem: http://www.onesmartdollar.com/phpinfo.php Thanks in advance. -Marcus Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted September 25, 2008 Share Posted September 25, 2008 Don't turn register_globals on. Register_globals were turned off six years ago because of the huge security hole they caused (a hacker can set session variables in your script simply by putting GET parameters on the end of the URL when he requests pages on your site.) No code written after 2002 should have relied on register_globals. Register_globals have been completely removed in upcoming php6. Spend your time fixing your script so that it references the correct program/post/get/cookie/session variables instead of expecting register_globals to magically populate them from each other. Link to comment Share on other sites More sharing options...
mox22 Posted September 25, 2008 Author Share Posted September 25, 2008 I purchased the script and their support tells me in order for it to work properly I have to turn register globals on. There is no way I can write the script myself. I'm new to this. What should I do? Link to comment Share on other sites More sharing options...
corbin Posted September 25, 2008 Share Posted September 25, 2008 Get your money back. In all seriousness, you could always recreate register globals with array_merge and extract. http://php.net/array_merge http://php.net/extract Link to comment Share on other sites More sharing options...
mox22 Posted September 25, 2008 Author Share Posted September 25, 2008 I don't even know what to do with that. It seems like it should be simple to do. Link to comment Share on other sites More sharing options...
corbin Posted September 25, 2008 Share Posted September 25, 2008 extract(array_merge($_POST, $_GET, $_COOKIE, $_SESSION)); Link to comment Share on other sites More sharing options...
dropfaith Posted September 25, 2008 Share Posted September 25, 2008 the best advise here was get your money back. register globals arent a good thing and your script you paid for clearly hasnt been updated in a long time Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted September 25, 2008 Share Posted September 25, 2008 In addition to fixing program/post/get/cookie/session variables, any use of session_register(), session_is_registered() and session_unregister() needs to be converted to use $_SESSION, as those three functions don't work unless register globals are on and those three functions are removed in php6. Link to comment Share on other sites More sharing options...
mox22 Posted September 25, 2008 Author Share Posted September 25, 2008 I want to turn register globals on. Can anyone tell me how to do it. My php.ini file didn't work, and .htaccess didn't work. Any suggestions? I'm a newbie som please be as detailed as possible. Thanks Link to comment Share on other sites More sharing options...
Stryves Posted September 25, 2008 Share Posted September 25, 2008 Did you restart the web server after changing the php.ini? Link to comment Share on other sites More sharing options...
DarkWater Posted September 25, 2008 Share Posted September 25, 2008 No, why in the world do you want register_globals on? They've been highly discouraged for years, and no script at ALL should still be using them. @Stryves: He uses GoDaddy hosting. He's posted this thread once before. =/ Link to comment Share on other sites More sharing options...
mox22 Posted September 25, 2008 Author Share Posted September 25, 2008 This is probably a stupid question, but how do I restart the webserver? Link to comment Share on other sites More sharing options...
Brian W Posted September 25, 2008 Share Posted September 25, 2008 Heed his warning friend... using globals is like asking to get mugged. Learn about super_globals instead. Link to comment Share on other sites More sharing options...
Stryves Posted September 25, 2008 Share Posted September 25, 2008 @DarkWater Oh heh. EDIT: NM, see the full thread now. Link to comment Share on other sites More sharing options...
DarkWater Posted September 25, 2008 Share Posted September 25, 2008 @DarkWater Oh heh. EDIT: NM, see the full thread now. A mod must have merged the threads. xD Link to comment Share on other sites More sharing options...
mox22 Posted September 25, 2008 Author Share Posted September 25, 2008 So How can I restart the webserver? Link to comment Share on other sites More sharing options...
Brian W Posted September 25, 2008 Share Posted September 25, 2008 Again, get your money back... offer the same amount (maybe more or less) in the freelance section to have someone build you the script. Or, keep the one you bought and pay someone to fix it or learn php and do it. Link to comment Share on other sites More sharing options...
DarkWater Posted September 25, 2008 Share Posted September 25, 2008 So How can I restart the webserver? You can't, it's not your webserver, it's GoDaddy's. =/ What exactly does this script do anyway? Link to comment Share on other sites More sharing options...
Brian W Posted September 25, 2008 Share Posted September 25, 2008 So How can I restart the webserver? (simple answer) You can't. (bit more complex) You can't, only GoDaddy (or whome ever you host is) can. They won't though because while it is restarting all of the sites on it will be down.... that would be costly. Also, likely, your host has the .ini setting COMPLETELY BLOCKED BECAUSE IT IS RETARDED TO USE GLOBALS. Link to comment Share on other sites More sharing options...
mox22 Posted September 25, 2008 Author Share Posted September 25, 2008 Now I'm not sure what to do. Why would the use globals if it is a security risk.? The URL is http://www.onesmartdollar.com it is a pyramid scheme type of thing. I asked godaddy how to turn globals on and they seaid to use a php.ini file, which I did but it does not work. I just want to turn it on the the site is functional, i'm not sure what security risks I have to be worried about. Link to comment Share on other sites More sharing options...
peranha Posted September 25, 2008 Share Posted September 25, 2008 Don't turn register_globals on. Register_globals were turned off six years ago because of the huge security hole they caused (a hacker can set session variables in your script simply by putting GET parameters on the end of the URL when he requests pages on your site.) That is the security issue Link to comment Share on other sites More sharing options...
mox22 Posted September 25, 2008 Author Share Posted September 25, 2008 Ok, but I'd still like to turn register globals on to test it. Does anyone know how I can do this? Link to comment Share on other sites More sharing options...
Stryves Posted September 25, 2008 Share Posted September 25, 2008 Call GoDaddy if you must absolutely must have it. Link to comment Share on other sites More sharing options...
kenrbnsn Posted September 25, 2008 Share Posted September 25, 2008 Pyramid schemes are illegal in most countries, no matter what the FAQ on the page says. Locking this thread. Ken Link to comment Share on other sites More sharing options...
Recommended Posts