I have script that needs register_globals just that it got deprecated in 5.3 and removed in 5.4 and I have PHP 5.5. Installing another version of xampp is not an option. I have found this http://www.kaffeetalk.de/using-register_globals-in-php-5-5/ just that this is not for xampp but for lamp or linux. How am I suppose to do it actually.
Asked
Active
Viewed 1,545 times
1 Answers
2
The blog post is pretty clear and will effectively simulate register globals. It will work with any server stack, XAMPP or whatever. The only thing you need to do is create the file and pay attention to which folder you put it in, and then reference that absolute path in your php.ini file.
HOWEVER - I strongly discourage you from doing this and instead look to remove the requirement for register globals by modifying the code itself.
edmondscommerce
- 2,001
- 12
- 21
-
have a look at this question: http://stackoverflow.com/questions/6185319/how-do-i-edit-php-ini-file-in-xampp-server – edmondscommerce Jan 13 '15 at 14:27
-
My folder is F:\SERVER\php\php.ini for php.ini and I placed register_globals.php in F:\SERVER\php\ and added the code `auto_prepend_file = 'register_globals.php'` at the bottom of my php.ini. Now I get `Fatal error: Unknown: Failed opening required 'register_globals.php' (include_path='.;F:\SERVER\php\PEAR') in Unknown on line 0` – Adrian Jan 13 '15 at 14:37
-
try putting the full path to the register globals file rather than just the file name, ie auto_prepend_file = 'F:\SERVER\php\register_globals.php' – edmondscommerce Jan 13 '15 at 14:40
-
you must understand that register globals is no longer in PHP, however this approach will simulate the behaviour of enabling register globals. – edmondscommerce Jan 13 '15 at 15:10