php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15792 sapi_apache2.c:247
Submitted: 2002-02-28 15:05 UTC Modified: 2002-04-21 14:29 UTC
Votes:5
Avg. Score:5.0 ± 0.0
Reproduced:5 of 5 (100.0%)
Same Version:3 (60.0%)
Same OS:2 (40.0%)
From: mentat at azsoft dot pl Assigned:
Status: Closed Package: Apache2 related
PHP Version: 4.1.2 OS: GNU/Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mentat at azsoft dot pl
New email:
PHP Version: OS:

 

 [2002-02-28 15:05 UTC] mentat at azsoft dot pl
in sapi/apache2filter/sapi_apache2.c

sapi_apache2.c: In function `php_apache_sapi_register_variables':
sapi_apache2.c:148: warning: initialization discards qualifiers from pointer target type
sapi_apache2.c: In function `php_input_filter':
sapi_apache2.c:247: incompatible type for argument 4 of `ap_get_brigade'
sapi_apache2.c:247: too few arguments to function `ap_get_brigade'
sapi_apache2.c: In function `php_register_hook':
sapi_apache2.c:408: warning: passing arg 2 of `ap_register_input_filter' from incompatible pointer type

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-01 03:42 UTC] sander@php.net
What's your configure line?
What version of Apache do you use? You should compile PHP with the latest CVS of Apache 2, (although beta 32 may work too).
 [2002-03-04 14:30 UTC] mentat at azsoft dot pl
> What's your configure line?

./configure \                                                                           --with-apxs2=/usr/local/apache2/bin/apxs \                                      --without-mysql

> What version of Apache do you use?

httpd-2.0.32-beta.tar.gz
 [2002-03-09 12:30 UTC] richard dot downing at bcs dot org dot uk
I get the same thing exactly.  I am using apache-2.0.23, and my compiler is gcc-3.0.3.  This might have a bearing.
Richard.
 [2002-03-11 01:47 UTC] richard at haimann dot com
Having the same problem with apache 2.0.32, PHP 4.1.2, Linux kernal 2.2.18, gcc 2.91.66, make 3.77, zlib 1.1.3, mysql 3.23.47, posgresql 7.2.

/etc/ld.so.cache has all the various shared libraries listed (and then some).

Apache, zlib, mysql, postresql all load and operate fine (with limited testing)

PHP however:

'./configure' \
'--with-zlib' \
'--with-zlib-dir=/usr/local/zlib' \
'--with-apxs2=/usr/local/apache2/bin/apxs' \
'--with-pgsql=shared,/usr/local/pgsql' \
'--with-mysql=shared,/usr/local/mysql' \
'--enable-force-cgi-redirect' \
'--enable-debug' \

configures fine.


make results in

sapi_apache2.c: In function `php_apache_sapi_register_variables':
sapi_apache2.c:148: warning: initialization discards `const' from pointer target
 type
sapi_apache2.c: In function `php_input_filter':
sapi_apache2.c:248: incompatible type for argument 4 of `ap_get_brigade'
sapi_apache2.c:248: too few arguments to function `ap_get_brigade'
sapi_apache2.c: In function `php_register_hook':
sapi_apache2.c:409: warning: passing arg 2 of `ap_register_input_filter' from in
compatible pointer type
make[3]: *** [sapi_apache2.lo] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1

make then ends.


The make compile line that results in this error is

make[3]: Entering directory `/usr/local/php-4.1.2/sapi/apache2filter'
/bin/sh /usr/local/php-4.1.2/libtool --mode=compile /usr/local/php-4.1.2/meta_ccld  -I. -I/usr/local/php-4.1.2/sapi/apache2filter -I/usr/local/php-4.1.2/main -I/usr/local/php-4.1.2 -I/usr/local/apache2/include -I/usr/local/php-4.1.2/Zend -I/usr/local/mysql/include -I/usr/local/php-4.1.2/ext/xml/expat  -D_REENTRANT -I/usr/local/php-4.1.2/TSRM -g -O2 -pthread -Wall -DZTS -prefer-pic  -c sapi_apache2.c
/usr/local/php-4.1.2/meta_ccld -I. -I/usr/local/php-4.1.2/sapi/apache2filter -I/usr/local/php-4.1.2/main -I/usr/local/php-4.1.2 -I/usr/local/apache2/include -I/usr/local/php-4.1.2/Zend -I/usr/local/mysql/include -I/usr/local/php-4.1.2/ext/xml/expat -D_REENTRANT -I/usr/local/php-4.1.2/TSRM -g -O2 -pthread -Wall -DZTS -c sapi_apache2.c  -fPIC -DPIC -o sapi_apache2.lo

I've found some old notes on earlier releases of PHP 4 with Apache 2 that this bug exists and has been worked around slightly by changing a line in

PHPROOT/sapi/apache2filter/sapi_apache2.c

from 

	if ((rv = ap_get_brigade(f->next, bb, mode, readbytes)) !=APR_SUCCESS) {
		return rv;


to

	if ((rv = ap_get_brigade(f->next, bb, mode)) !=APR_SUCCESS) {
		return rv;


I tried this with no success.  Not having worked on any of this code in the past, I am facing a daunting task trying to debug this.  If anyone has any insight, I would greatly appreciate it.  Otherwise, I am going to go back to Apache 1.3.23 and PHP 3.0.18.

Thanks in advance
Richard
http://www.haimann.com
 [2002-03-20 14:54 UTC] bugs at optonline dot net
I just want to say I got this same error and I have 
Mandrake 8.1.

[root@irc-server php-4.1.2]# ./configure 
--with-apxs2=/www/bin/apxs --without-mysql --quiet

That's my configure line. It works without any errors. 
Hope this bug is fixed soon. Thanks in advance. :)
 [2002-03-20 15:00 UTC] sniper@php.net
Try latest CVS snapshot from http://snaps.php.net/ as this
should be fixed there.

 [2002-03-20 15:02 UTC] sniper@php.net
reclassified
 [2002-04-21 00:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2002-04-21 14:29 UTC] sniper@php.net
These should be fixed in PHP 4.2.0 (which will be released
tomorrow)

 [2002-06-03 07:22 UTC] peter at heckwork dot nl
I experience the same problem with Apache 2.0.36 + PHP 4.2.1 on SuSE 7.2 machines:

make[3]: *** [sapi_apache2.lo] Error 1
make[3]: Leaving directory `/usr/local/php-4.2.1/sapi/apache2filter'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/php-4.2.1/sapi/apache2filter'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/php-4.2.1/sapi'
make: *** [all-recursive] Error 1


Peter van Heck
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Jul 31 20:01:24 2021 UTC