Apache HTTPD and Module API Versions
The API_VERSION
can be found by using either the mod_rewrite.c
module, or the mod_info.c
module. Here is how the mod_rewrite module defines it.
- API_VERSION
- This is the version of the Apache module API (the internal interface between server and module) in the current httpd build, as defined in include/ap_mmn.h. The module API version corresponds to the version of Apache in use (in the release version of Apache 1.3.14, for instance, it is 19990320:10), but is mainly of interest to module authors.
Find the API Version with .htaccess
To find the Apache API Version, which tells us among other things the version of Apache being run, we can use the tricks detailed in the crazy advanced mod_rewrite tutorial to find it using .htaccess directives.
Apache HTTPD Module API
MODULE_MAGIC_NUMBER
- Versions 1.3.1 and lower. Initializer for the first few module slots, which are only really set up once we start running. Note that the first word is a version check; this should allow us to deal with changes to the API (the server can detect an old-format module, and either handle it back-compatibly, or at least signal an error).
MODULE_MAGIC_NUMBER_MAJOR
- Major API changes that could cause compatibility problems for older modules such as structure size changes. No binary compatibility is possible across a change in the major version.
MODULE_MAGIC_NUMBER_MINOR
- Minor API changes that do not cause binary compatibility problems. Should be reset to 0 when upgrading
MODULE_MAGIC_NUMBER_MAJOR
.
Apache HTTPD/API Versions
Further Reading
« .htaccess Plugin Blocks Spam, Hackers, and Password Protects BlogHtaccess SetEnvIf and SetEnvIfNoCase Examples »
Comments