You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Guenter Knauf <fu...@apache.org> on 2009/07/05 16:45:10 UTC
show apr/apr-util version with mod_info
Hi,
since one httpd version can link to a couple of different apr/apr-util
versions I find it useful to have these versions listed with mod_info,
and if nobody objects then I would like to apply a patch similar to the
one below (which is 2.2.x) to trunk, and then propose for backport into
2.2.x:
--- mod_info.c.orig Tue Nov 11 21:58:26 2008
+++ mod_info.c Fri Jul 03 07:10:34 2009
@@ -44,6 +44,7 @@
#include "apr.h"
#include "apr_strings.h"
#include "apr_lib.h"
+#include "apr_version.h"
#define APR_WANT_STRFUNC
#include "apr_want.h"
@@ -342,6 +343,9 @@
server_rec *serv = r->server;
int max_daemons, forked, threaded;
+ ap_rputs(DOCTYPE_HTML_3_2
+ "<html><head>\n<title>Apache Info</title>\n</head><body>\n",
+ r);
ap_rputs("<h2><a name=\"server\">Server Settings</a></h2>", r);
ap_rprintf(r,
"<dl><dt><strong>Server Version:</strong> "
@@ -351,6 +355,16 @@
"<dt><strong>Server Built:</strong> "
"<font size=\"+1\"><tt>%s</tt></font></dt>\n",
ap_get_server_built());
+ ap_rprintf(r,
+ "<dt><strong>Apache Portable Runtime Version:</strong> "
+ "<font size=\"+1\"><tt>%s</tt></font></dt>\n",
+ apr_version_string());
+#if APR_MAJOR_VERSION < 2
+ ap_rprintf(r,
+ "<dt><strong>Apache Portable Utility Version:</strong> "
+ "<font size=\"+1\"><tt>%s</tt></font></dt>\n",
+ apu_version_string());
+#endif
ap_rprintf(r,
"<dt><strong>Module Magic Number:</strong> "
"<tt>%d:%d</tt></dt>\n", MODULE_MAGIC_NUMBER_MAJOR,
Günter.
Re: show apr/apr-util version with mod_info
Posted by Guenter Knauf <fu...@apache.org>.
Hi Rüdiger,
Ruediger Pluem schrieb:
> No objections, but the above should not be part of the patch as the HTML
> header stuff is already done in mod_info and would be doubled.
yes, I know; but its only in trunk - with 2.2.x branch its missing ...
Günter.
Re: show apr/apr-util version with mod_info
Posted by Ruediger Pluem <rp...@apache.org>.
On 07/05/2009 04:45 PM, Guenter Knauf wrote:
> Hi,
> since one httpd version can link to a couple of different apr/apr-util
> versions I find it useful to have these versions listed with mod_info,
> and if nobody objects then I would like to apply a patch similar to the
> one below (which is 2.2.x) to trunk, and then propose for backport into
> 2.2.x:
>
> --- mod_info.c.orig Tue Nov 11 21:58:26 2008
> +++ mod_info.c Fri Jul 03 07:10:34 2009
> @@ -44,6 +44,7 @@
> #include "apr.h"
> #include "apr_strings.h"
> #include "apr_lib.h"
> +#include "apr_version.h"
> #define APR_WANT_STRFUNC
> #include "apr_want.h"
>
> @@ -342,6 +343,9 @@
> server_rec *serv = r->server;
> int max_daemons, forked, threaded;
>
> + ap_rputs(DOCTYPE_HTML_3_2
> + "<html><head>\n<title>Apache Info</title>\n</head><body>\n",
> + r);
> ap_rputs("<h2><a name=\"server\">Server Settings</a></h2>", r);
> ap_rprintf(r,
> "<dl><dt><strong>Server Version:</strong> "
No objections, but the above should not be part of the patch as the HTML
header stuff is already done in mod_info and would be doubled.
Regards
Rüdiger
Re: show apr/apr-util version with mod_info
Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
William A. Rowe, Jr. wrote:
> Guenter Knauf wrote:
>> Hi,
>> since one httpd version can link to a couple of different apr/apr-util
>> versions I find it useful to have these versions listed with mod_info,
>> and if nobody objects then I would like to apply a patch similar to the
>> one below (which is 2.2.x) to trunk, and then propose for backport into
>> 2.2.x:
>
> +1, and if you look at main.c, you can find the snippet of publishing
> both the current runtime and compiled-against library versions. I suggest
> both for the obvious reasons.
Saving you a lookup, here is that code;
printf("Server loaded: APR %s, APR-UTIL %s\n",
apr_version_string(), apu_version_string());
printf("Compiled using: APR %s, APR-UTIL %s\n",
APR_VERSION_STRING, APU_VERSION_STRING);
Re: show apr/apr-util version with mod_info
Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
Guenter Knauf wrote:
> Hi,
> since one httpd version can link to a couple of different apr/apr-util
> versions I find it useful to have these versions listed with mod_info,
> and if nobody objects then I would like to apply a patch similar to the
> one below (which is 2.2.x) to trunk, and then propose for backport into
> 2.2.x:
+1, and if you look at main.c, you can find the snippet of publishing
both the current runtime and compiled-against library versions. I suggest
both for the obvious reasons.