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
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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.