hi!
Is it possible to use the header-Function to modify the HTTP-header with PHP running as CGI?
So far I think it fails for me because my apache-webserver runs PHP as CGI and I have to use #!/usr/bin/php in the first line. And so (i think) the header-modification will not work because there is already a output to the file.
#!/usr/bin/php
<?php ob_start();
header("Content-type: text/html");
header("Location: [url]http://server/goto.php[/url]");
?>
The output: https://cgi.tfh-berlin.de/~s19436/loc.php
headers:
Date: Fri, 10 Sep 2004 20:22:06 GMT
Server: Apache/1.3.26 (Linux/SuSE) mod_perl/1.27 mod_ssl/2.8.10 OpenSSL/0.9.6g
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html
content:
Content-type: text/html Location: [url]http://server/goto.php[/url]
Any idears on this?
thx