You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Rasmus Lerdorf <ra...@lerdorf.on.ca> on 1998/05/09 03:48:51 UTC

SERVER_SUBVERSION?

When I compile Apache+PHP3 right now I get:

Server: 3.0R-Dev Apache/1.3b7-dev (UNIX) PHP/3.0R-Dev

Here is my init_handler function:

void php3_init_handler(server_rec *s, pool *p)
{
        register_cleanup(p, NULL, php3_module_shutdown, php3_module_shutdown);
#if MODULE_MAGIC_NUMBER >= 19980507
        ap_add_version_component(PHP_VERSION);
#endif
}

The ap_add_version_component() is not adding, it is prepending.  And, I am
also compiling Apache with -DSERVER_SUBVERSION="PHP/3.0R-Dev" which I
would have thought would have been ignored now.  But it is added on to the
end.  I am still compiling with this flag to support older versions.  It
is tricky for me to detect the Apache version when I build my Makefile.

-Rasmus


Re: SERVER_SUBVERSION?

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Rasmus Lerdorf wrote:
> 
> When I compile Apache+PHP3 right now I get:
> 
> Server: 3.0R-Dev Apache/1.3b7-dev (UNIX) PHP/3.0R-Dev
>
> The ap_add_version_component() is not adding, it is prepending.

That's what it's supposed to do.  The bogosity there is because
Jim reversed the calls in ap_set_version() that add SUBVERSION
and BASEVERSION.  Because of the prepending, they need to be done
in reverse order - BASE last.  That's one of the reasons
ap_set_version() exists, to make sure the BASE is in the right
place in the string.

#ken	P-)}

Ken Coar                    <http://Web.Golux.Com/coar/>
Apache Group member         <http://www.apache.org/>
"Apache Server for Dummies" <http://Web.Golux.Com/coar/ASFD/>