Bug#44357: php3: zlib support breaks $PHP_INCLUDE_PATH [patch] (fwd)
| From: | Gergely Madarasz | Date: | Thu, 01 Jan 1970 00:00:00 +0000 |
| Subject: | Bug#44357: php3: zlib support breaks $PHP_INCLUDE_PATH [patch] (fwd) | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-10611@lists.php.net to get a copy of this message | ||
Hello,
I just got this report and patch in the debian BTS. Could you please
comment on it ?
Greg
---------- Forwarded message ----------
Date: Wed, 01 Sep 1999 15:29:04 +0200
From: Patrik Rak <patrik@ein.cz>
To: submit@bugs.debian.org
Subject: Bug#44357: php3: zlib support breaks $PHP_INCLUDE_PATH [patch]
Resent-Date: Sun, 05 Sep 1999 05:13:36 +0000 (GMT)
Resent-From: Patrik Rak <patrik@ein.cz>
Resent-To: debian-bugs-dist@lists.debian.org
Resent-cc: Gergely Madarasz <gorgo@sztaki.hu>
Package: php3
Version: 1:3.0.12-2
Severity: normal
Hi!
I found a bug which prevented use of $PHP_INCLUDE_PATH
and $PHP_DOCUMENT_ROOT configuration variables in php3-cgi.
Note that it is very likely that it also prevented proper functioning
of "derived configurations" in Apache (i.e., when using php_* directives
in non-global context, like in VirualHost).
The tested patch for this is attached below - enjoy!
Patrik
--- functions/zlib.c.orig Wed Jun 16 06:34:22 1999
+++ functions/zlib.c Wed Sep 1 07:48:07 1999
@@ -128,8 +128,10 @@
#if PHP_31
# define ZLIB_INI(a) ZLIB_GLOBAL(a)
+# define ZLIB_INIT_CONFIG 1
#else
# define ZLIB_INI(a) php3_ini.a
+# define ZLIB_INIT_CONFIG 0
#endif
function_entry php3_zlib_functions[] = {
@@ -183,12 +185,13 @@
return FAILURE;
}
#endif
+#if ZLIB_INIT_CONFIG
/* get our ini variables here */
cfg_get_long("safe_mode",&ZLIB_INI(safe_mode));
cfg_get_long("magic_quotes_runtime",&ZLIB_INI(magic_quotes_runtime));
cfg_get_string("doc_root",&ZLIB_INI(doc_root));
cfg_get_string("include_path",&ZLIB_INI(include_path));
-
+#endif
ZLIB_GLOBAL(le_zp) = register_list_destructors(php3i_destructor_gzclose,NULL);
return SUCCESS;
}