diff options
author | lukem <lukem> | 2004-04-30 00:06:42 +0000 |
---|---|---|
committer | lukem <lukem> | 2004-04-30 00:06:42 +0000 |
commit | c83cccef6a9b127d094cbed942bad19953bb95a2 (patch) | |
tree | 5019c7224ffe8ff17e3049bb9b078cf5df1d3457 /www | |
parent | 6f2973e567153ed8190b74da9ff8a7fae7fc1946 (diff) | |
download | pkgsrc-c83cccef6a9b127d094cbed942bad19953bb95a2.tar.gz |
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 (limited to 'www')
-rw-r--r-- | www/php4/Makefile.common | 4 | ||||
-rw-r--r-- | www/php4/distinfo | 3 | ||||
-rw-r--r-- | www/php4/patches/patch-aa | 33 |
3 files changed, 37 insertions, 3 deletions
diff --git a/www/php4/Makefile.common b/www/php4/Makefile.common index 81e3b81c067..e0845b74c18 100644 --- a/www/php4/Makefile.common +++ b/www/php4/Makefile.common @@ -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 @@ HOMEPAGE?= http://www.php.net/ # 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 --git a/www/php4/distinfo b/www/php4/distinfo index dff7429498d..4a140598c5d 100644 --- a/www/php4/distinfo +++ b/www/php4/distinfo @@ -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 --git a/www/php4/patches/patch-aa b/www/php4/patches/patch-aa new file mode 100644 index 00000000000..2f7313d3d33 --- /dev/null +++ b/www/php4/patches/patch-aa @@ -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); |