Package: mini-httpd
Version: 1.19-3
Severity: normal
Tags: patch

Hi,

the latest version of mini-httpd doesn't work correctly when using PHP 
CGI-scripts.
The error-message is the following: "No input file specified."

A patched version of mini-httpd is used at the m0n0wall-project, but the patch 
from that project also includes some specific changes related to the project 
itself.
That's why I modified the patch to fit to a more general installation of 
mini-httpd.

Best regards,

Thorsten Schmale


-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.9-023stab044.12-smp
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)

Versions of packages mini-httpd depends on:
ii  libc6                  2.3.6.ds1-13etch4 GNU C Library: Shared libraries
ii  libssl0.9.8            0.9.8c-4etch1     SSL shared libraries

mini-httpd recommends no packages.

-- no debconf information
--- mini_httpd.c.orig	2005-06-29 19:31:17.000000000 +0200
+++ mini_httpd.c	2008-01-24 13:59:53.000000000 +0100
@@ -1129,7 +1129,7 @@
     int r, file_len, i;
     const char* index_names[] = {
 	"index.html", "index.htm", "index.xhtml", "index.xht", "Default.htm",
-	"index.cgi" };
+	"index.cgi", "index.php" };
 
     /* Set up the timeout for reading. */
 #ifdef HAVE_SIGSET
@@ -2117,6 +2117,7 @@
     int envn;
     char* cp;
     char buf[256];
+    char rp[MAXPATHLEN];
 
     envn = 0;
     envp[envn++] = build_env( "PATH=%s", CGI_PATH );
@@ -2134,7 +2135,7 @@
     envp[envn++] = build_env( "SERVER_PORT=%s", buf );
     envp[envn++] = build_env(
 	"REQUEST_METHOD=%s", get_method_str( method ) );
-    envp[envn++] = build_env( "SCRIPT_NAME=%s", path );
+    envp[envn++] = build_env( "SCRIPT_FILENAME=%s", realpath(file, rp) );
     if ( pathinfo != (char*) 0 )
 	{
 	envp[envn++] = build_env( "PATH_INFO=/%s", pathinfo );

Reply via email to