Bug #118
closedCGI not working on Cygwin
Description
In lighttpd 1.3.13, when running on cygwin, works fine. But, when I use it with PHP (5.0.4), it works fine until i go to a page that uses PHP (which is pretty much my entire site). Then the RAM uage for lighttpd goes up forever. Well, i end tasked it at the point when it was usung 80 MB of my RAM. Here is a copy of my config file -
- default document-root
server.document-root = "C:/htdocs"
- TCP port
server.port = 80
- selecting modules
server.modules = ( "mod_access", "mod_rewrite", "mod_cgi" )
- enable directory listings
server.dir-listing = "enable"
cgi.assign = ( ".php" => "C:/php/php-cgi.exe" )
mimetype.assign = ( ".php" => "application/x-httpd-php",
".png" => "image/png",
".jpg" => "image/jpeg",
".jpeg" => "image/jpeg",
".html" => "text/html",
".txt" => "text/plain" )
server.indexfiles = ( "index.php", "index.html",
"index.htm", "default.htm" )
Please help. If this is resolved, please email me.
-- daemon404
Updated by Anonymous about 19 years ago
In order to call a "Windows" PHP from a "Cygwin" program you should at least translate SCRIPT_FILENAME env var from "/path/to/file" to "c:\path\to\file".
You can create a script like this to do that:
#!/bin/sh
export SCRIPT_FILENAME=`/usr/bin/cygpath -w "$SCRIPT_FILENAME"`
/cygdrive/c/Program\ Files/PHP/php-cgi.exe @
This doesn't solve the issue, anyway: to me it's 100 CPU instead of RAM, but still not working.
Not even if I call the following as a CGI:
#!/bin/sh
echo Content-Type: text/plain
echo
echo Hello world.
-- lapo
Updated by Anonymous about 19 years ago
In order to call a "Windows" PHP from a "Cygwin" program you should at least translate SCRIPT_FILENAME env var from "/path/to/file" to "c:\path\to\file". You can create a script like this to do that:
#!perl #!/bin/sh export SCRIPT_FILENAME=`/usr/bin/cygpath -w "$SCRIPT_FILENAME"` /cygdrive/c/Program\ Files/PHP/php-cgi.exe %@
This doesn't solve the issue, anyway: to me it's 100% CPU instead of RAM, but still not working. Not even if I call the following as a CGI:
#!perl #!/bin/sh echo Content-Type: text/plain echo echo Hello world.
PS: sorry for the previous not-well-formatted comment, delete it at will.
-- lapo
Updated by Anonymous about 19 years ago
- Status changed from New to Fixed
- Resolution set to worksforme
Works for my on Cygwin, using lighttpd-1.4.8 and the wrapper I wrote in last comment.
-- lapo
Updated by stbuehler over 16 years ago
- Status changed from Fixed to Missing Feedback
Updated by gstrauss about 1 year ago
- Description updated (diff)
- Status changed from Missing Feedback to Fixed
- ASK QUESTIONS IN Forums set to No
Fixed per above comment.
Also available in: Atom