Forum

cgi.rfc2616_headers revisited

celilo
12 June 2014, 08:13
I'm wondering if the documentation (https://www.hiawatha-webserver.org/howto/php_configuration) indicating to set cgi.rfc2616_headers=1 in order to send RFC 2616 compliant headers is out of date.

The php documentation, http://nl1.php.net/manual/en/ini.core.php#ini.cgi.rfc2616-headers, specifically indicates to set cgi.rfc2616_headers=0 when using PHP-FPM, which I am using. Changing this setting back to 0 resolved an issue that I was experiencing with Firefox attempting to download rather than execute some php links.

Perhaps this is a remnant from when we were using the deprecated php-fcgi server?

Hiawatha version: 9.6
Operating System: Arch Linux
Mustafa Ramadhan
15 June 2014, 09:43
This issue appear in apache with mod_fastcgi but nothing problem with nginx/lighttpd/hiawatha. Testing in Kloxo-MR
celilo
15 June 2014, 10:44
Thank you Mustafa, but I experienced the issue specifically using Hiawatha and php-fpm. There may be other issues in code that result in this behavior, but changing this setting to 0 resolved my issue without creating any other issues to my knowledge ; of course observation alone clearly does not establish a good test case.
Hugo Leisink
15 June 2014, 14:39
I've done some testing, but both settings work me. PHP prints a Status HTTP header when cgi.rfc2616_headers is set to 0 but also when set to 1. I'm using PHP 5.3.10.

However, looking at the PHP documentation, it looks like the default value 0 seems to be the correct one. I'll change this in the Hiawatha documentation.
This topic has been closed.