Forum

Generating HTTP Headers from PHP CLI?

William
24 April 2012, 22:50
Hi Hugo,

I'm configuring Hiawatha with PHP on OSX. Right now, I'm getting a 500 error. I've read some other posts and understand that I cannot use the PHP CLI program which came with OSX and need to install the cgi version.

However, before doing so, do you know if it possible to have the pre-installed PHP CLI version explicitly output the HTTP headers? If so, could your provide some help on doing so?

Thanks,

William

Hiawatha version: 7.8
Operating System: OSX 10.7
Hugo Leisink
24 April 2012, 23:20
The biggest problem with the CLI version is that they don't print the required CGI headers. You can use the CLI version, but then every script must print their own headers:
    print "Content-Type: text/html\r\n";
print "\r\n";
William
24 April 2012, 23:37
Ok, thank you for responding so quickly.
This topic has been closed.