angelsRock Posted September 18, 2007 Share Posted September 18, 2007 hi i have the following error.. Server Requirement Error: register_globals is disabled in your PHP configuration. This can be enabled in your php.ini configuration file or in the .htaccess file in your catalog directory. the hosting server register_globals is set to be "off".. so i cant change that to be off.. so what should i do to the code.. because this code is soomeone bought it from UK..impossible for me to change all the coding... pls advice asap... haha. Quote Link to comment Share on other sites More sharing options...
darkfreaks Posted September 18, 2007 Share Posted September 18, 2007 ask your host to turn it on or remove it? Quote Link to comment Share on other sites More sharing options...
angelsRock Posted September 18, 2007 Author Share Posted September 18, 2007 i have not ask them yet... but if they were to turn on.. then surely affect their security...i got the hosting from www.hostmonster.com whta can i do.. ? haahhaa.. die.. Quote Link to comment Share on other sites More sharing options...
darkfreaks Posted September 18, 2007 Share Posted September 18, 2007 you could remove the register global function from all your pages and then see what happens. and go from there? Quote Link to comment Share on other sites More sharing options...
darkfreaks Posted September 18, 2007 Share Posted September 18, 2007 actually you need to open up your .htaccess file and do a mod rewrite to allow register globals http://kim.biyn.com/Linux/enabling_register_globals_locally_for_virtual_host that should do the trick Quote Link to comment Share on other sites More sharing options...
btherl Posted September 18, 2007 Share Posted September 18, 2007 A small clarification - mod_rewrite is the mechanism for rewriting and redirecting urls, which is often done in .htaccess. Disabling register_globals isn't related to mod_rewrite, although it can be done in the same file. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted September 18, 2007 Share Posted September 18, 2007 hi i have the following error.. Server Requirement Error: register_globals is disabled in your PHP configuration. This can be enabled in your php.ini configuration file or in the .htaccess file in your catalog directory. the hosting server register_globals is set to be "off".. so i cant change that to be off.. so what should i do to the code.. because this code is soomeone bought it from UK..impossible for me to change all the coding... pls advice asap... haha. if you are using a script which requires register_globals then either upgrade the script (if one is available) or look for similar script which does not require this setting. Quote Link to comment Share on other sites More sharing options...
btherl Posted September 18, 2007 Share Posted September 18, 2007 If you have basic php knowledge, you can find an appropriate place (or places) to add code that simulates register_globals. The code will look something like this: <?php foreach($_ENV AS $key => $value) { ${$key} = $value; } foreach($_GET AS $key => $value) { ${$key} = $value; } foreach($_POST AS $key => $value) { ${$key} = $value; } foreach($_COOKIE AS $key => $value) { ${$key} = $value; } foreach($_SERVER AS $key => $value) { ${$key} = $value; }?> Or you could post in freelancing and ask someone to fix the script for you. The first option though would be to get your script provider to fix it. Requiring register_globals is frowned upon by modern php programmers. 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.