From:
ruri.himura
Date:
Jun 23 04:11 UTC
Short link
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
Any suggestions?...
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
From:
Phillip Pearson
Date:
Jun 23 22:21 UTC
Short link
This would be good too; it'll set $remote_ip from the X-Forwarded-For header if
there is one, otherwise it'll return 127.0.0.1, which is correct in this
case...
if ($remote_ip == '127.0.0.1' && isset($_SERVER['HTTP_X_FORWARDED_FOR']))
$remote_ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
Cheers,
Phil
Martin Spernau wrote:
> 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
>>
>> Any suggestions?...
>>
>>
>> -----------------------------------------
>> Full text of this topic in pa-users:
>> http://lists.peopleaggregator.org/r/topic/2o1tUqEnFmVsClEywC8ZuO
>>
>> To leave pa-users, email
>> mailto:pa-users@lists.peopleaggregator.org?Subject=unsubscribe
>>
>> pa-users is powered by
>> OnlineGroups.Net http://onlinegroups.net
>>
>>
>>
>>
>
> -----------------------------------------
> Full text of this topic in pa-users:
> http://lists.peopleaggregator.org/r/topic/4xcEciQug46yKsp0lhNk4L
>
> To leave pa-users, email
> mailto:pa-users@lists.peopleaggregator.org?Subject=unsubscribe
>
> pa-users is powered by
> OnlineGroups.Net http://onlinegroups.net
>
Add to the topic
Error in "mywidgets" page
[?]
You cannot post because you are not logged in.
If you are a member
pa-users,
login to post to this topic.
Otherwise
sign up,
become a member of
pa-users,
and post to this topic.