From 0fd89aa20d7a8226e68f13f4418e9183b46acd6e Mon Sep 17 00:00:00 2001 From: Zeev Suraski Date: Thu, 10 Feb 2000 17:55:01 +0000 Subject: More cleanup - move getenv() to SAPI --- sapi/apache/mod_php4.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'sapi/apache/mod_php4.c') diff --git a/sapi/apache/mod_php4.c b/sapi/apache/mod_php4.c index edf848dd6a..7a9cb0ee94 100644 --- a/sapi/apache/mod_php4.c +++ b/sapi/apache/mod_php4.c @@ -306,6 +306,14 @@ static int php_apache_get_uid(SLS_D) } +static char *php_apache_getenv(char *name, int name_len SLS_DC) +{ + char *value; + + return (char *) table_get(((request_rec *) SG(server_context))->subprocess_env, name)); +} + + static sapi_module_struct sapi_module = { "Apache", /* name */ @@ -318,7 +326,7 @@ static sapi_module_struct sapi_module = { sapi_apache_ub_write, /* unbuffered write */ sapi_apache_flush, /* flush */ php_apache_get_uid, /* get uid */ - + php_apache_getenv, /* getenv */ php_error, /* error handler */ -- cgit v1.2.1