[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#595163: marked as done (PATCH to make php-cgi work with thttpd)



Your message dated Sun, 01 Jan 2012 15:43:09 +0000
with message-id <E1RhNYz-0001dR-KF@franck.debian.org>
and subject line Bug#653752: Removed package(s) from unstable
has caused the Debian Bug report #595163,
regarding PATCH to make php-cgi work with thttpd
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
595163: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=595163
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: thttpd
Version: 2.25b-6
Severity: normal
Tags: patch

php-cgi needs SCRIPT_FILENAME environement variable to be defined to
detects it was invoqued as CGI script. It is not CGI compliant, but it
was writen like this. Here is a little patch which defines this
environment variable and take care of the TILDE_MAP_[12] preprocessor
definitions (in thttpd config.h), even if theses configuration variables
are undefined in Debian packages.

It also adds the index.php name to the index filename list to search for.

--- thttpd-2.25b.orig/config.h
+++ thttpd-2.25b/config.h
@@ -333,7 +333,7 @@
 /* CONFIGURE: A list of index filenames to check.  The files are searched
 ** for in this order.
 */
-#define INDEX_NAMES "index.html", "index.htm", "index.xhtml", "index.xht", "Default.htm", "index.cgi"
+#define INDEX_NAMES "index.php", "index.html", "index.htm", "index.xhtml", "index.xht", "Default.htm", "index.cgi"
 
 /* CONFIGURE: If this is defined then thttpd will automatically generate
 ** index pages for directories that don't have an explicit index file.
--- thttpd-2.25b.orig/libhttpd.c
+++ thttpd-2.25b/libhttpd.c
@@ -3045,6 +3045,13 @@
     envp[envn++] = build_env(
    "SCRIPT_NAME=/%s", strcmp( hc->origfilename, "." ) == 0 ?
    "" : hc->origfilename );
+    // PHP-CGI Support patch (Fanfan <francois@cerbelle.net>) : Begin
+    if ( hc->expnfilename[0] == '/' )
+        (void) my_snprintf(buf, sizeof(buf), "%s", strcmp( hc->expnfilename, "." ) == 0 ? "" : hc->expnfilename );
+    else
+        (void) my_snprintf(buf, sizeof(buf), "%s%s", hc->hs->cwd, strcmp( hc->expnfilename, "." ) == 0 ? "" : hc->expnfilename );
+    envp[envn++] = build_env("SCRIPT_FILENAME=%s", buf);
+    // PHP-CGI Support patch : End
     if ( hc->query[0] != '\0')
    envp[envn++] = build_env( "QUERY_STRING=%s", hc->query );
     envp[envn++] = build_env(

-- System Information:
Debian Release: 5.0.5
  APT prefers stable
  APT policy: (990, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-2-686 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash



--- End Message ---
--- Begin Message ---
Version: 2.25b-11+rm

Dear submitter,

as the package thttpd has just been removed from the Debian archive
unstable we hereby close the associated bug reports.  We are sorry
that we couldn't deal with your issue properly.

For details on the removal, please see http://bugs.debian.org/653752

The version of this package that was in Debian prior to this removal
can still be found using http://snapshot.debian.org/.

This message was generated automatically; if you believe that there is
a problem with it please contact the archive administrators by mailing
ftpmaster@debian.org.

Debian distribution maintenance software
pp.
Ansgar Burchardt (the ftpmaster behind the curtain)


--- End Message ---

Reply to: