Re: php5 and global variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hii,

thanks lucky guy.

yes it is helpful but only for those who donot know php's basics. 

Register global is the biggest problem which makes one to lose security in the website. and so the hacking can be done easily. 


Warm regards,

Tarun
  ----- Original Message ----- 
  From: LuckyGuy354 
  To: php-objects@xxxxxxxxxxxxxxx 
  Sent: Wednesday, March 26, 2008 7:09 PM
  Subject: Re:  php5 and global variables


  IME, no need to edit .htaccess.

  Do you have a file which at the top of every file? Like config.php, which 
  will included by the other files? If yes, use this line on the top of that 
  file:

  import_request_variables("gpc", "");

  If you don;t have that file, place that file which you need register globals 
  on, on there.

  This function will convert $_GET['var'], $_POST['var'], $_COOKIE['var'] into 
  $var, and other varibles to that schema. From PHP manual: Note that the 
  order of the letters matters, as when using "gp", the POST variables will 
  overwrite GET variables with the same name. Any other letters than GPC are 
  discarded

  Hope this help. But, what Krishna wrote is very helpfull for the future 
  projects :). Register globals on (or modification with that function) is 
  have security risk.

  LuckyGuy354
  IT Beginner

  http://www.wiwid.org

  ----- Original Message ----- 
  From: "Tarun" <tarun.virgo@xxxxxxxxx>
  To: <php-objects@xxxxxxxxxxxxxxx>
  Sent: Tuesday, March 25, 2008 9:46 PM
  Subject:  php5 and global variables

  > hello Friends,
  >
  > How to set global variables " ON" in php 5 in .htaccess file.
  >
  > in php4 we could set it by using the following line.
  >
  > <IfModule mod_php4.c>
  > php_value session.use_trans_sid 0
  > php_value register_globals 1
  > </IfModule>
  >
  > but what to do for php5 to use global variables, and updating htaccess.
  >
  > Please suggest me
  >
  > Warm Regards,
  >
  > Tarun



   

[Non-text portions of this message have been removed]


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux