From c151b4a37f27968c246ce5c02a688e933cfdd4e2 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Mon, 11 Dec 2006 14:54:29 +0000 Subject: [PATCH] MFB: Fixed bug #39787 (PHP doesn't work with Apache 2.3). --- sapi/apache2filter/php_functions.c | 4 ++++ sapi/apache2handler/php_functions.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/sapi/apache2filter/php_functions.c b/sapi/apache2filter/php_functions.c index e8665fa506..aa9f2b61ca 100644 --- a/sapi/apache2filter/php_functions.c +++ b/sapi/apache2filter/php_functions.c @@ -289,7 +289,11 @@ PHP_FUNCTION(apache_getenv) static char *php_apache_get_version() { +#if MODULE_MAGIC_NUMBER_MAJOR >= 20060905 + return (char *) ap_get_server_banner(); +#else return (char *) ap_get_server_version(); +#endif } /* {{{ proto string apache_get_version(void) diff --git a/sapi/apache2handler/php_functions.c b/sapi/apache2handler/php_functions.c index 63a9aafe35..ef9b0e9323 100644 --- a/sapi/apache2handler/php_functions.c +++ b/sapi/apache2handler/php_functions.c @@ -333,7 +333,11 @@ PHP_FUNCTION(apache_getenv) static char *php_apache_get_version() { +#if MODULE_MAGIC_NUMBER_MAJOR >= 20060905 + return (char *) ap_get_server_banner(); +#else return (char *) ap_get_server_version(); +#endif } /* {{{ proto string apache_get_version(void) -- 2.50.1