pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/www/php4 CGI/1.1, as documented at:
details: https://anonhg.NetBSD.org/pkgsrc/rev/fe02d9886831
branches: trunk
changeset: 474462:fe02d9886831
user: lukem <lukem%pkgsrc.org@localhost>
date: Fri Apr 30 00:06:42 2004 +0000
description:
CGI/1.1, as documented at:
http://cgi-spec.golux.com/
mentions SCRIPT_NAME but not SCRIPT_FILENAME.
Support web servers that only supply the former, even though
PHP 4.3 wants the latter to operate as a CGI...
Fixes problem using PHP 4.3 under a variety of non-Apache web servers.
diffstat:
www/php4/Makefile.common | 4 ++--
www/php4/distinfo | 3 ++-
www/php4/patches/patch-aa | 33 +++++++++++++++++++++++++++++++++
3 files changed, 37 insertions(+), 3 deletions(-)
diffs (68 lines):
diff -r 0726232fcb6b -r fe02d9886831 www/php4/Makefile.common
--- a/www/php4/Makefile.common Thu Apr 29 23:58:56 2004 +0000
+++ b/www/php4/Makefile.common Fri Apr 30 00:06:42 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.36 2004/04/24 22:46:13 jlam Exp $
+# $NetBSD: Makefile.common,v 1.37 2004/04/30 00:06:42 lukem Exp $
DISTNAME?= php-${PHP_DIST_VERS}
CATEGORIES+= www php4
@@ -17,7 +17,7 @@
#
PHP_DIST_VERS= 4.3.6
PHP_BASE_VERS= ${PHP_DIST_VERS}
-PKGREVISION= # empty
+PKGREVISION= 1
DISTFILES?= ${PHP_DISTFILE}
PHP_DISTFILE= ${DISTNAME}${EXTRACT_SUFX}
diff -r 0726232fcb6b -r fe02d9886831 www/php4/distinfo
--- a/www/php4/distinfo Thu Apr 29 23:58:56 2004 +0000
+++ b/www/php4/distinfo Fri Apr 30 00:06:42 2004 +0000
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.26 2004/04/20 19:19:23 jdolecek Exp $
+$NetBSD: distinfo,v 1.27 2004/04/30 00:06:42 lukem Exp $
SHA1 (php-4.3.6.tar.bz2) = c5696d778f0684fae94ee2ca6463f37c97228441
Size (php-4.3.6.tar.bz2) = 3957796 bytes
+SHA1 (patch-aa) = feb064407950d0fc732b7240e65cac84420d2407
SHA1 (patch-ab) = cc7785755774377d4eb2d3d4816cea61234da167
SHA1 (patch-ag) = 1ded1d7f4daac6806f41864c783f16d3403315e4
SHA1 (patch-ah) = 0ac37bd35c4594cb58f1ea85ef811154b644a931
diff -r 0726232fcb6b -r fe02d9886831 www/php4/patches/patch-aa
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/www/php4/patches/patch-aa Fri Apr 30 00:06:42 2004 +0000
@@ -0,0 +1,33 @@
+$NetBSD: patch-aa,v 1.10 2004/04/30 00:06:42 lukem Exp $
+
+--- sapi/cgi/cgi_main.c.orig 2004-04-01 03:01:45.000000000 +1000
++++ sapi/cgi/cgi_main.c
+@@ -679,6 +679,20 @@ static void init_request_info(TSRMLS_D)
+ char *env_script_filename = sapi_cgibin_getenv("SCRIPT_FILENAME",0 TSRMLS_CC);
+ char *env_path_translated = sapi_cgibin_getenv("PATH_TRANSLATED",0 TSRMLS_CC);
+ char *script_path_translated = env_script_filename;
++ char *env_script_name = sapi_cgibin_getenv("SCRIPT_NAME",0 TSRMLS_CC);
++
++ /*
++ * CGI/1.1, as documented at:
++ * http://cgi-spec.golux.com/
++ * mentions SCRIPT_NAME but not SCRIPT_FILENAME.
++ * Support web servers that only supply the former,
++ * even though PHP 4.3 wants the latter ...
++ */
++ if (!script_path_translated && env_script_name && *env_script_name == '/') {
++ env_script_filename = _sapi_cgibin_putenv("SCRIPT_FILENAME",(env_script_name + 1) TSRMLS_CC);
++
++ script_path_translated = env_script_filename;
++ }
+
+ #if !DISCARD_PATH
+ /* some broken servers do not have script_filename or argv0
+@@ -707,7 +721,6 @@ static void init_request_info(TSRMLS_D)
+ char *content_length = sapi_cgibin_getenv("CONTENT_LENGTH",0 TSRMLS_CC);
+ char *content_type = sapi_cgibin_getenv("CONTENT_TYPE",0 TSRMLS_CC);
+ char *env_path_info = sapi_cgibin_getenv("PATH_INFO",0 TSRMLS_CC);
+- char *env_script_name = sapi_cgibin_getenv("SCRIPT_NAME",0 TSRMLS_CC);
+ #if ENABLE_PATHINFO_CHECK
+ struct stat st;
+ char *env_redirect_url = sapi_cgibin_getenv("REDIRECT_URL",0 TSRMLS_CC);
Home |
Main Index |
Thread Index |
Old Index