Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

fatal error : register_globals is disabled


Recommended Posts

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


I just install my Ubuntu (debian base) linux . On top of it I install apache2 , php4 and mysql


when I try to open index.php I get the error listed above.


Could you please help me out please.


also when I do ; http://localhost it gives my directory list instead of trying to open my index.php.



thanks again

Link to comment
Share on other sites

You need to edit the php.ini file and set register_globals on. The default value if it is not set is off.


Make sure you are editing the proper php.ini. Find the location by running a xxxx.php file in your browser with the phpinfo() command.


Also, double check that your apache config file has index.php as the default file to open in a directory.


Finally, restart apache after changing the config files.




Link to comment
Share on other sites

For those new to php. The section you need in php.ini looks like this.


; Whether or not to register the EGPCS variables as global variables.  You may
; want to turn this off if you don't want to clutter your scripts' global scope
; with user data.  This makes most sense when coupled with track_vars - in which
; case you can access all of the GPC variables through the $HTTP_*_VARS[],
; variables.
; You should do your best to write your scripts so that they do not require
; register_globals to be on;  Using form variables as globals can easily lead
; to possible security problems, if the code is not very well thought of.
register_globals = Off

; This directive tells PHP whether to declare the argv&argc variables (that
; would contain the GET information).  If you don't use these variables, you
; should turn it off for increased performance.
register_argc_argv = On




register_globals = Off




register_globals = On


and save the file.

Link to comment
Share on other sites

  • 1 month later...


This topic is now archived and is closed to further replies.

  • Create New...