--- parser3/src/targets/apache/mod_parser3.c 2010/11/23 00:13:47 1.10 +++ parser3/src/targets/apache/mod_parser3.c 2012/04/18 13:34:39 1.13 @@ -1,12 +1,10 @@ /** @file Parser: apache 1.3 and 2.2 module - Copyright (c) 2001-2010 ArtLebedev Group (http://www.artlebedev.com) + Copyright (c) 2001-2012 Art. Lebedev Studio (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char * const IDENT_MOD_PARSER3_C="$Date: 2010/11/23 00:13:47 $"; - #ifdef WIN32 #include #endif @@ -21,6 +19,8 @@ static const char * const IDENT_MOD_PARS #include "pa_httpd.h" +volatile const char * IDENT_MOD_PARSER3_C="$Id: mod_parser3.c,v 1.13 2012/04/18 13:34:39 moko Exp $" IDENT_PA_HTTPD_H; + #define PARSER3_HANDLER "parser3-handler" /* @@ -80,6 +80,10 @@ static int parser_handler(request_rec *r if(strcmp(r->handler, PARSER3_HANDLER)) return DECLINED; #endif + + // we setup module here to avoid GPF on init with php5-xsl installed + pa_setup_module_cells(); + // converting to parser version pa_request_rec pr={ r, @@ -112,8 +116,7 @@ static void parser_child_init(apr_pool_t #else static void parser_module_init(server_rec *s, apr_pool_t *p) { #endif - ap_log_perror(APLOG_MARK, APLOG_EMERG, 0, p, "parser inited %d", getpid()); - pa_setup_module_cells(); +// ap_log_perror(APLOG_MARK, APLOG_EMERG, 0, p, "parser inited %d", getpid()); } /* @@ -146,7 +149,7 @@ static void *parser_create_server_config */ static const command_rec parser_cmds[] = { - {"ParserConfig", (cmd_func)cmd_parser_config, 0, OR_OPTIONS, TAKE1, "Parser config filespec"}, + {"ParserConfig", (const char *(*)())cmd_parser_config, 0, OR_OPTIONS, TAKE1, "Parser config filespec"}, {NULL} }; @@ -299,7 +302,7 @@ int pa_ap_rwrite(const void *buf, int nb void pa_ap_hard_timeout(const char *s, pa_request_rec *r) { // Apache 2 uses non-blocking I/O #ifndef STANDARD20_MODULE_STUFF - ap_hard_timeout(s, (request_rec*)r->real_request_rec); + ap_hard_timeout((char *)s, (request_rec*)r->real_request_rec); #endif } void pa_ap_reset_timeout(pa_request_rec *r) {