Make the version code get the version from the current Apache, rather then

the Apache PHP was compiled against.
This commit is contained in:
Ilia Alshanetsky 2002-12-27 23:05:15 +00:00
parent 648dd88b42
commit 097055a862
2 changed files with 14 additions and 2 deletions

View 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;
}
}
/* }}} */

View 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;
}
}
/* }}} */