Jump to content

Register Globals


Canman2005

Recommended Posts

Hi all

I recently moved a load of websites to a new server, my old server had the register globals turned on, and on the new server they are turned off.

What needs to be changed in my php scripts in order to get it to work, as most of the pages wont function due to this change. I have alot of sites, so is there a easy way?

I have found some information on fixing pages, but im not great with php and most of it made little sense to me.

I did find some scripts which you put at the top of each php page to sort this issue, but on pages where images are uploaded via a php page and so on, those sort of scripts dont seem to work.

I am on shared hosting so cannot change the php.ini file.

Any help would be great

Thanks

Ed
Link to comment
Share on other sites

Sloppy and insecure, but - for example - add this at the start of all the 'non-working' scripts that use forms to pass data. Review the manual for alternative uses of extract():
[code]extract($_POST); // abstract POSTed array data[/code]
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.