note 37928 deleted from function.header by bjori
| From: | bjori@php.net | Date: | Mon, 27 Mar 2006 09:56:12 +0000 |
| Subject: | note 37928 deleted from function.header by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-106739@lists.php.net to get a copy of this message | ||
Note Submitter: ahring.de
----
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)