Can someone tell me how to use PHP ini to enable global_register=on in my server.
Well, firstly, the setting is named "register_globals".
Secondly, it has been deprecated for a reason, so in general, my suggestion would be to change your scripts to not depend upon it, and then leave it off. You can more-or-less emulate it on a per script basis by adding the following to the beginning of a given script (with the possibility of the same problems that using register_globals can cause):
Only specify the sources you need to be imported: g = GET, p = POST, and c = COOKIE; in order to avoid creating unnecessary avenues of attack. Of course, it's still better to not use this at all and directly reference the $_GET, $_POST, and/or $_COOKIE super-global arrays instead and simply get completely out of the habit of depending on such behavior.
Thank you for your help. Fact is the scripts i ma trying to use is purchased from a vendor and vendor says register_globals = on is a requirment. I understand that this has some risk factors.
Now having seen your suggestion i have checked my scripts but can't figure out where to change the script to not depend upon register_globals.
If you permit me i will send one of the scripts i think should need changed to your eamil box. The content is too large to append here. But you may see the attached zip file here.
Last edited by akluch2; 04-07-2010 at 11:22 AM.
You can add the import_request_variables() call to the top of any of the scripts. It just needs to appear once in a given script before any other PHP code that might need to access the input variables.
Thanks NoDog. My script is now working properly.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)