note 37928 added to function.header
| From: | ahring dot de at rn2 dot php dot net | Date: | Tue, 02 Dec 2003 15:54:20 +0000 |
| Subject: | note 37928 added to function.header | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-61273@lists.php.net to get a copy of this message | ||
After processing POST data, I usually write
header("HTTP/1.1 303 REDIRECT");
header("Location: http://$absurl");
which should be the correct method (strictly speaking, 302 for HTTP/1.0 clients)
After uploading the working scripts to our ISP the first line gave an 500 Internal Server Error.
I could not find out what triggered this error, as everything else was working fine. I have no
access to the apache-error-logs nor the configfiles. phpinfo() returns apache 1.3.27 (Red-Hat), PHP
4.1.2.
Taking the hint from the documentation and changing to
header("Location: http://$absurl");
header("Status: 303");
worked for me. I don't know what circumstances made the 500 ISE happen, but if it does for you,
try Status.
(since I read somewhere about an PHP bug in an old version, I also first set the Location, then the
Status. Checking via Telnet to Port 80, it sets the status correctly)
----
Manual Page -- http://www.php.net/manual/en/function.header.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+37928
Delete -- http://master.php.net/manage/user-notes.php?action=delete+37928&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+37928&report=yes
Search -- http://master.php.net/manage/user-notes.php