Re: Notice: Undefined index: HTTP_X_FORWARDED_FOR

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

 



On Thu, Sep 15, 2011 at 7:25 AM, J. Bakshi <joydeep@xxxxxxxxxxxxxxx> wrote:
I am trying a small php script in my servers and the both the cases
I get errors as

This is not an Apache question, so you should really ask it on a PHP list.
That said:

` ` ` `
Notice: Undefined index: HTTP_X_FORWARDED_FOR
` ` ` `
Am I missing any apache module in those server ?

No. That header is only set when the request came through a proxy server.
You should either turn off PHP notice reporting or find the place in your code where the notice is generated and wrap it in
if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
    ___YOUR_CODE___
}

- Y

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux