MrXander Posted April 3, 2009 Share Posted April 3, 2009 Hi Guys, Might be a simple question, but I just downloaded a PHP script that I want to modify slightly, only problem is, I have been through 5 pages (out of about 150) adding the lines, such as $p = $_GET['p'];, as it's not picking it up. Is there anyway round it? Thanks Quote Link to comment Share on other sites More sharing options...
jonsjava Posted April 3, 2009 Share Posted April 3, 2009 are you modifying the same thing on every page? If so, there are programs out there (not sure what they have for windows, I use sed for linux) that can do this for you. Quote Link to comment Share on other sites More sharing options...
MrXander Posted April 3, 2009 Author Share Posted April 3, 2009 No, unfortunately. There may be one line the same on each page, for the navigation, setting $p = $_GET['p'], for example. The unfortunate thing is, there is forms and submit buttons, so I will also have to go through and define, for example, $submit = $_POST['submit']. Is there not something I can enable on my server to get around this? Quote Link to comment Share on other sites More sharing options...
mrMarcus Posted April 3, 2009 Share Posted April 3, 2009 what are you trying to accomplish by changing all this? Quote Link to comment Share on other sites More sharing options...
MrXander Posted April 3, 2009 Author Share Posted April 3, 2009 Well, the script is devloped with the variables not defined, so I will have to edit every page so that it will pick it up. Surely though there is a way round this, as they developed it like this? Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted April 3, 2009 Share Posted April 3, 2009 You found a script that is dependent on register globals. Register globals were turned off by default 7 years ago and have been completely removed in php6. Your choice is to fix every file or find a more up to date script that is not dependent on register globals. You will also need to find and fix session problems if the script is using session_register(), session_is_registered(), and session_unregister() and any variables like $PHP_SELF that should be their corresponding $_SERVER variable. 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.