Hi

I was trying to compile php-4.2.3 with apache 2.0.39 on linux. My
configure was like this: 
freaky:~/php-4.2.3$ ./configure --prefix=/home/himanshu/apache
--with-apxs2=/home/himanshu/apache/bin/apxs
--with-config-file-path=/home/himanshu/apache/php
--with-pgsql=/usr/local/postgresql/


I get the following error when I make:
/bin/sh /home/himanshu/php-4.2.3/libtool --silent --mode=compile gcc
-I. -I/home/himanshu/php-4.2.3/sapi/apache2filter
-I/home/himanshu/php-4.2.3/main -I/home/himanshu/php-4.2.3
-I/home/himanshu/apache/include -I/home/himanshu/php-4.2.3/Zend
-I/home/himanshu/php-4.2.3/ext/mysql/libmysql
-I/usr/local/postgresql//include
-I/home/himanshu/php-4.2.3/ext/xml/expat  -D_REENTRANT
-I/home/himanshu/php-4.2.3/TSRM -DTHREAD=1 -g -O2 -pthread -DZTS
-prefer-pic  -c sapi_apache2.c
sapi_apache2.c: In function `php_register_hook':
sapi_apache2.c:567: incompatible type for argument 3 of
`ap_register_output_filter'
sapi_apache2.c:567: too many arguments to function
`ap_register_output_filter'
sapi_apache2.c:568: incompatible type for argument 3 of
`ap_register_input_filter'
sapi_apache2.c:568: too many arguments to function
`ap_register_input_filter'
make[3]: *** [sapi_apache2.lo] Error 1
make[3]: Leaving directory `/home/himanshu/php-4.2.3/sapi/apache2filter'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/himanshu/php-4.2.3/sapi/apache2filter'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/himanshu/php-4.2.3/sapi'
make: *** [all-recursive] Error 1



When I looked into the apache header file util_filter.h, the
ap_register_input_filter and ap_register_output_filter were defined as
following:

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);


So then I changed sapi_apache2.c to:
static void php_register_hook(apr_pool_t *p)
{
        ap_hook_pre_config(php_pre_config, NULL, NULL, APR_HOOK_MIDDLE);
        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, NULL,
AP_FTYPE_RESOURCE);
        ap_register_input_filter("PHP", php_input_filter, NULL,
AP_FTYPE_RESOURCE); */

        ap_register_output_filter("PHP", php_output_filter,
AP_FTYPE_RESOURCE);
        ap_register_input_filter("PHP", php_input_filter,
AP_FTYPE_RESOURCE);

}


After this, I was able to successfully compile php with apache2.0.39.


Thanx


Himanshu Soni
Software Engineer
PKI Innovations, Inc.
http://www.pk3i.com
Suite 420 - 1122 Mainland Street
Vancouver, BC, Canada
V6B 5L1 
Phone: 604.484.7544 ext 107


 



-- 
PHP Install Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to