Project

General

Profile

Actions

Bug #118

closed

CGI not working on Cygwin

Added by Anonymous almost 19 years ago. Updated 3 months ago.

Status:
Fixed
Priority:
High
Category:
core
Target version:
-
ASK QUESTIONS IN Forums:
No

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 -

  1. default document-root
    server.document-root = "C:/htdocs"
  1. TCP port
    server.port = 80
  1. selecting modules
    server.modules = ( "mod_access", "mod_rewrite", "mod_cgi" )
  1. 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

Actions #1

Updated by Anonymous about 18 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

Actions #2

Updated by Anonymous about 18 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

Actions #3

Updated by Anonymous about 18 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

Actions #4

Updated by stbuehler over 15 years ago

  • Status changed from Fixed to Missing Feedback
Actions #5

Updated by gstrauss 3 months ago

  • Description updated (diff)
  • Status changed from Missing Feedback to Fixed
  • ASK QUESTIONS IN Forums set to No

Fixed per above comment.

Actions

Also available in: Atom