diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2002-12-27 23:05:15 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2002-12-27 23:05:15 +0000 |
commit | 097055a86234d8982f43e5ca9ef1a0dc3cbd35c9 (patch) | |
tree | 0e289b46265e77cc5d1ab9861d6d2398236bc41a /sapi/apache_hooks | |
parent | 648dd88b42ffeda9922611a7ce7e83416382c381 (diff) | |
download | php-git-097055a86234d8982f43e5ca9ef1a0dc3cbd35c9.tar.gz |
Make the version code get the version from the current Apache, rather then
the Apache PHP was compiled against.
Diffstat (limited to 'sapi/apache_hooks')
-rw-r--r-- | sapi/apache_hooks/php_apache.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sapi/apache_hooks/php_apache.c b/sapi/apache_hooks/php_apache.c index e8cd54d53b..0d098e385d 100644 --- a/sapi/apache_hooks/php_apache.c +++ b/sapi/apache_hooks/php_apache.c @@ -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; + } } /* }}} */ |