php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #59677 mod_htscanner compilation error for Apache2
Submitted: 2011-03-21 10:10 UTC Modified: 2011-03-26 07:46 UTC
From: k dot LabMouse at gmail dot com Assigned: martynas (profile)
Status: Closed Package: htscanner (PECL)
PHP Version: 5.2.17 OS: Debian Squeeze
Private report: No CVE-ID: None
 [2011-03-21 10:10 UTC] k dot LabMouse at gmail dot com
Description:
------------
mod_htscanner.c does not compile apxs2 (Apache 2.2.17)

Fix:
#include "httpd.h"
#include "http_config.h"
#include <stdio.h>

module AP_MODULE_DECLARE_DATA htscanner_module;

static const char *dummy(cmd_parms *cmd, void *config, const 
char *arg) {
    return (NULL);
}

static command_rec htscanner_cmds[] = {
    AP_INIT_ITERATE("php_flag", dummy, NULL, OR_OPTIONS, 
"PHP Flag Modifier"),
    AP_INIT_ITERATE("php_value", dummy, NULL, OR_OPTIONS, 
"PHP Value Modifier"),
    { NULL }
};

module AP_MODULE_DECLARE_DATA htscanner_module =
{
    STANDARD20_MODULE_STUFF,
    NULL,			   /* dir config creater */
    NULL,                          /* dir merger --- default 
is to override */
    NULL,                          /* server config */
    NULL,                          /* merge server config */
    htscanner_cmds,               /* command apr_table_t */
    NULL                           /* register hooks */
};

Expected result:
----------------
mod_htscanner compile for Apache 2 (2.2.17 and future)

Actual result:
--------------
mod_htscanner does not compile for Apache 2 (2.2.17)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-03-26 07:46 UTC] martynas at venck dot us
Thanks for your report.

The htscanner.c provided with the package is for Apache 1.x API.  As you may know, Apache 1.x and 2.x APIs are incompatible.  I don't use Apache 2.x myself, therefore mod_htscanner wasn't available for it.

I've committed a slightly different module in trunk;  tested by Todd Bangerter.  Trunk now has two versions of mod_htscanner:

mod_htscanner.c - for Apache 1.x API,
mod_htscanner2.c - for Apache 2.x API.
 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Tue Sep 25 07:01:25 2018 UTC