]> granicus.if.org Git - php/commitdiff
Make the version code get the version from the current Apache, rather then
authorIlia Alshanetsky <iliaa@php.net>
Fri, 27 Dec 2002 23:05:15 +0000 (23:05 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Fri, 27 Dec 2002 23:05:15 +0000 (23:05 +0000)
the Apache PHP was compiled against.

sapi/apache/php_apache.c
sapi/apache_hooks/php_apache.c

index 17d455e773c07948a83afc2f3527e337e3159028..7cf3bb9d3e313e21b0e154c3580fe22bd6ea211c 100644 (file)
@@ -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;
+       }
 }
 /* }}} */
 
index e8cd54d53b6a41cee6ad3c66ab1653c7d166e699..0d098e385d74684192b4be183c07a489d93c807f 100644 (file)
@@ -1916,7 +1916,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;
+       }
 }
 /* }}} */