Jump to content

register_globals is disabled


angelsRock

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/69719-register_globals-is-disabled/
Share on other sites

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.

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.