#19209 [Fbk->Csd]: sapi_apache2.c fails to compile with Apache 2.0.40 library
| From: | sniper@php.net | Date: | Tue, 03 Sep 2002 23:14:06 +0000 |
| Subject: | #19209 [Fbk->Csd]: sapi_apache2.c fails to compile with Apache 2.0.40 library | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-18351@lists.php.net to get a copy of this message | ||
ID: 19209
Updated by: sniper@php.net
Reported By: tony@lava.net
-Status: Feedback
+Status: Closed
Bug Type: Compile Failure
Operating System: BSDI 4.3
PHP Version: 4.2.2
New Comment:
This bug has been fixed in CVS.
In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2002-08-31 00:14:37] kalowsky@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-latest.zip
------------------------------------------------------------------------
[2002-08-31 00:11:49] tony@lava.net
First I modified php_functions.c and changed "MODULE_MAGIC_AT_LEAST" to
"AP_MODULE_MAGIC_AT_LEAST"
Then I proceeded with building:
./configure --with-apxs2=/usr/local/apache2/bin/apxs
make
This eventually gave the following errors:
sapi_apache2.c: In function `php_register_hook':
sapi_apache2.c:534: warning: passing arg 3 of
`ap_register_output_filter' makes pointer from integer without a cast
sapi_apache2.c:534: too few arguments to function
`ap_register_output_filter'
sapi_apache2.c:535: warning: passing arg 3 of
`ap_register_input_filter' makes pointer from integer without a cast
sapi_apache2.c:535: too few arguments to function
`ap_register_input_filter'
I tracked this down to a change made recently in Apache's include file
util_filter.h. The older functions are defined as:
AP_DECLARE(ap_filter_rec_t *) ap_register_input_filter(const char
*name, ap_in_filter_func filter_func, ap_filter_type ftype);
AP_DECLARE(ap_filter_rec_t *) ap_register_output_filter(const char
*name, ap_out_filter_func filter_func, ap_filter_type ftype);
The newer functions have an additional argument:
AP_DECLARE(ap_filter_rec_t *) ap_register_input_filter(const char
*name, ap_in_filter_func filter_func, ap_init_filter_func filter_init,
ap_filter_type ftype);
AP_DECLARE(ap_filter_rec_t *) ap_register_output_filter(const char
*name, ap_out_filter_func filter_func, ap_init_filter_func filter_init,
ap_filter_type ftype);
Not sure what the appropriate fix is. I just added a NULL to the third
argument in the function call to sapi_apache2filter.c and it compiles
ok. Here's a diff.
--- sapi/apache2filter/sapi_apache2.c.orig Mon May 6 05:42:23
2002
+++ sapi/apache2filter/sapi_apache2.c Fri Aug 30 17:53:22 2002
@@ -531,8 +531,8 @@
ap_hook_post_config(php_apache_server_startup, NULL, NULL,
APR_HOOK_MIDDLE);
ap_hook_insert_filter(php_insert_filter, NULL, NULL,
APR_HOOK_MIDDLE);
ap_hook_post_read_request(php_post_read_request, NULL, NULL,
APR_HOOK_MIDDLE);
- ap_register_output_filter("PHP", php_output_filter,
AP_FTYPE_RESOURCE);
- ap_register_input_filter("PHP", php_input_filter,
AP_FTYPE_RESOURCE);
+ ap_register_output_filter("PHP", php_output_filter, NULL,
AP_FTYPE_RESOURCE);
+ ap_register_input_filter("PHP", php_input_filter, NULL,
AP_FTYPE_RESOURCE);
}
AP_MODULE_DECLARE_DATA module php4_module = {
Apache starts up but doesn't process any PHP code. Any hints would be
appreciated.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=19209&edit=1