Error in "mywidgets" page
From:
Martin Spernau
Date:
Jun 23 12:32 UTC
Short link
Ah yes :)
This is an issue when you are running on a localhost (127.0.0.1) because
config.inc in that case assumes you are running behind a squid prox<
(whichis a common setup)
Lickily you can get rid of this warning easily:
find the line
if ($remote_ip == '127.0.0.1') $remote_ip =
$_SERVER['HTTP_X_FORWARDED_FOR'];
and replace with
if ($remote_ip == '127.0.0.1') $remote_ip =
@$_SERVER['HTTP_X_FORWARDED_FOR'];
the '@' will supress Warnings or Errors in this expression, which is
safe here as this code doesn't apply to the localhost situation here.
If the $_SERVER['HTTP_X_FORWARDED_FOR']; *does* have a value, everything
will run as expected.
hope that helps,
-Martin
ruri.himura schrieb:
> Hello everybody,
>
> I already install PA on my ubuntu. now whe I go to "my widgets" page the page
show me this:
>
> Notice: Undefined index: HTTP_X_FORWARDED_FOR in /var/www/pep/config.inc on
line 76
>
> Warning: session_start() [function.session-start]: Cannot send session cache
limiter - headers already sent (output started at /var/www/pep/config.inc:76)
in /var/www/pep/web/includes/functions/functions.php on line 140
>
> Warning: Cannot modify header information - headers already sent by (output
started at /var/www/pep/config
>
> .inc:76) in /var/www/pep/web/includes/functions/functions.php on line 239
>
> Warning: Cannot modify header information - headers already sent by (output
started at /var/www/pep/config.inc:76) in
/var/www/pep/web/includes/functions/functions.php on line 240
>
> Warning: Cannot modify header information - headers already sent by (output
started at /var/www/pep/config.inc:76) in
/var/www/pep/web/includes/functions/functions.php on line 241