Enable register globals

It is strongly recommended that you do not turn on the register_globals. But if you still want to turn on register_globals then follow these steps

Make a .php file containing only this code

<?php phpinfo(); ?>

And upload this file to your new server and open in the browser. In the page output find the value for 'register_globals'. If it is off, then you can solve this problem in the following ways

  1. Turn on the register_globals in php.ini by
    register_globals = On
    (it will not be possible if you are on a shared web server)
  2. Put extract($_REQUEST) on the top of every .php file.
  3. Turn on register_globals using .htaccess make a text file with the name .htaccess and put the following code in it and upload to the root folder
    php_flag register_globals on
    If you already have a .htaccess file in your website, then simply put this code in it.
Bookmark and Share

Related Posts

Leave a Comment