Browse Source

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

the Apache PHP was compiled against.
PHP-5
Ilia Alshanetsky 24 years ago
parent
commit
097055a862
  1. 8
      sapi/apache/php_apache.c
  2. 8
      sapi/apache_hooks/php_apache.c

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

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

Loading…
Cancel
Save