FATAL ERROR: register_globals is disabled in php.ini, please enable it Ubuntu

Are you facing the following error in Linux /Ubuntu:

FATAL ERROR: register_globals is disabled in php.ini, please enable it

If this is the case then here is a problem solution:

Solution – register_globals is disabled in php.ini

While installing zencart in Ubuntu, I got the error of register_globals is disabled in php.ini, so here is a simple solution:

  • Open up the Terminal: Applications -> Accessories -> Terminal
  • Now open the file php.ini in any editor, existing in your php’s apache folder, in my case its php5:
    sudo gedit /etc/php5/apache2/php.ini
    or
    gedit /etc/php5/apache2/php.ini
  • Find the text in the php.ini file as register_globals, where you will find the text as:
    register_globals = Off
    and change this line to
    register_globals = On

Now save and close the file, and restart apache server. In my case, it is:

sudo /etc/init.d/apache2 restart

All done.

Now you will be able to get rid of this error and enjoy coding.

If you have any suggestion, or can advise something better than the solution above, please share.

Uncategorised

Leave a Reply

Your email address will not be published. Required fields are marked *