httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Correia" <richard.corr...@ugamsolutions.com>
Subject RE: [users@httpd] Error 302 5. Redirection Alert.
Date Tue, 21 Oct 2003 14:18:47 GMT
Dear Robert,

I think "Location: index.php" is a perfect header. Browser will use
earlier request path to make full request when it will receive this
header.

About $PHP_SELF, he must have register_globals=On in php.ini file.

Richard



-----Original Message-----
From: Robert Andersson [mailto:robert@profundis.nu] 
Sent: Tuesday, October 21, 2003 7:32 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Error 302 5. Redirection Alert.


elimachi@datacom.com.bo wrote:
> No, the behavior don not prevail. So the problem may be with the 
> script. I`m using php v4.1.2 for Linux RH7.3 and the script is:

May be, just may be?

> if (eregi("index.php", $PHP_SELF)) {
>        Header("Location: index.php");
>        die();
> }

This is bad code, what is it doing here? PHP_SELF is the filename of the
executing script, and if it matches "index.php" this code redirect to
itself, again and again. "Location: index.php" isn't even a valid
header, as I'm pretty sure it requires an absolute URI. By default in
PHP 4+, $PHP_SELF should not be available, either.

If this is your code, go back to: http://www.php.net/manual/en/

If you have taken it from somewhere, complain and/or try to fix it
yourself. It has *nothing* to do with Apache and all with a bad script.

Regards,
Robert Andersson


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server
Project. See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message