I'm running php 4.4.2 under mod_fastcgi, and it works great except that mod_fastcgi.c has this stupid code in it:
A regular apache handler will let you set r->status as many times as you please, and will just keep the last one when it sends headers out to the client. However, mod_fastcgi.c chokes and croaks with a 500 error if you try to set the status more than once. The end result is that scripts that work fine under mod_php give a 500 error with php/mod_fastcgi.Code:if (strcasecmp(name, "Status") == 0) { int statusValue = strtol(value, NULL, 10); if (hasStatus) { goto DuplicateNotAllowed; } if (statusValue < 0) { fr->parseHeader = SCAN_CGI_BAD_HEADER; return ap_psprintf(r->pool, "invalid Status '%s'", value); } hasStatus = TRUE; r->status = statusValue; r->status_line = ap_pstrdup(r->pool, value); continue; }
In particular, vbseo makes mod_fastcgi spit out this little gem when it tries to send a 404:
FastCGI: comm with server "/var/www/fcgi-php/php" aborted: error parsing headers: duplicate header 'Status'
This can be fixed in the vbseo php code by making sure that it doesn't set the Status more than once. However, this fastcgi pickyness breaks tons of other php scripts too (like wordpress)
I got it working by hacking mod_fastcgi.c as follows:
This has been reported as a bug to the php developers here:Code:if (hasStatus) { /* goto DuplicateNotAllowed; */ }
PHP Bugs: #33225: PHP sends multiple Status headers
Their response is "don't do that then." (don't send status headers twice, then), and they closed the bug report as bogus. So, vbseo is technically broken under php/mod_fastcgi (because mod_fastcgi.c is a little b***)
Dunno if you guys want to fix your code or not, in any case I'm reporting my workaround for other mod_fastcgi people.



LinkBack URL
About LinkBacks





)
