From 097055a86234d8982f43e5ca9ef1a0dc3cbd35c9 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Fri, 27 Dec 2002 23:05:15 +0000 Subject: Make the version code get the version from the current Apache, rather then the Apache PHP was compiled against. --- sapi/apache/php_apache.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'sapi/apache/php_apache.c') diff --git a/sapi/apache/php_apache.c b/sapi/apache/php_apache.c index 17d455e773..7cf3bb9d3e 100644 --- a/sapi/apache/php_apache.c +++ b/sapi/apache/php_apache.c @@ -507,7 +507,13 @@ PHP_FUNCTION(apache_exec_uri) Fetch Apache version */ PHP_FUNCTION(apache_get_version) { - RETURN_STRING(SERVER_VERSION, 1); + char *apv = (char *) ap_get_server_version(); + + if (apv && *apv) { + RETURN_STRING(apv, 1); + } else { + RETURN_FALSE; + } } /* }}} */ -- cgit v1.2.1