How To Enable Global Variables Register_globals In PHP APACHE Server Php.ini


How To Enable Global Variables Register_globals In PHP APACHE Server Php.ini
  Forums Index
      » Linux Hosting Forums
        » » how to enable global variables register_globals in PHP APACHE server php.ini



How To Enable Global Variables Register_globals In PHP APACHE Server Php.ini
Post Description:
Post Tags: how, to, enable, global, variables, register, globals, in, php, apache, server, phpini, linux hosting, troubleshoot, help, support advise, questions, answers
This Post Has Been Viewed 1381 Times Since Sun Jul 15, 2007 8:12 pm Posted By hostman with 1 replies
Next Post »» Stop Error Reporting Notice: Undefined LInux Apache PHP Server
How To Enable Global Variables Register_globals In PHP APACHE Server Php.ini
if you want know how you can enable and or disable register_globals in your web server. just do this:

send command:
nano /etc/php.ini


now look for this line:
register_globals = Off


Change it to:
register_globals = On


restart apache server with this command:
/etc/init.d/httpd restart


that's it - NOTE: by enabling register_globals your server will be less secured, read 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.


Leave Your Comments
* Your Name

  * Your Email Address (Will Not Be Published)

* Your Comments


Add Picture To Comments
Yes No             upload
Receive Replies on my Comments
(An email will be sent to you when someone replies to your comments)

     




Comments and replies About How To Enable Global Variables Register_globals In PHP APACHE Server Php.ini






:: 1 :: #46674 - Reply By hostman On Sat Mar 22, 2008 6:31 pm
also..


if you want to turn it on within your page you can put this code at the begining of your code:

ini_set('register_globals', true)