Seems that nginx doesn't pass information properly to php-cgi

Hannu Ylitalo hanski at gmail.com
Mon Mar 16 15:23:57 MSK 2009


Hi,

I'm trying to migrate from lighttpd to nginx on a server that is
running geeklog (http://www.geeklog.net/). For example plugin
configuration isn't working and seems that nginx doesn't pass
information to php properly (data is submitted with POST but updating
settings doesn't work). Php is launched with spawn-cgi and same
configuration works fine with apache and lighttpd. I tried adding
debug information to logs but there wasn't really anything regarding
this there.

Eventually I tried stracing both php-cgi and nginx processes and
compared those with the ones from lighttpd.

http://hnsk.net/nginx/strace.txt  -  first there's the differing parts
from php-cgi processes and then httpd processes.

Strace is from lighttpd 1.4.21 and nginx 0.7.39 but the problem
existed with 0.6.34 and I didn't find any updates/fixes in the
changelog regarding this issue. I'm no coder but to me it seems that
lighttpd is buffering the POST data somehow and the only read()
matches to content-length submitted by browser and nginx sending it in
two parts that add up to content-lenght combined and some data in
between.

-- 
Hannu Ylitalo
hanski at gmail.com





More information about the nginx mailing list