php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58161 using PHP 4 optimization leaves request_rec undeclared in apc_cache_expunge
Submitted: 2008-04-16 14:59 UTC Modified: 2008-12-30 05:05 UTC
From: toconnell at southcomm dot com Assigned:
Status: Wont fix Package: APC (PECL)
PHP Version: 4.4.8 OS: Fedora Core 3
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2008-04-16 14:59 UTC] toconnell at southcomm dot com
Description:
------------
I have an FC3 server on which I've built Apache 1.3.41 and PHP 
4.4.8 from source. I just downloaded the latest stable tarball 
of APC (3.0.18). Per the recommendation for optimizing against 
PHP 4 in INSTALL, I modified my CPPFLAGS to reference httpd.h 
and the APC_PHP4_STAT macro. But I get an undeclared 
identifier error from gcc.

Reproduce code:
---------------
Here's my bash command:

export CPPFLAGS="-I/path/to/apache/include -DAPC_PHP4_STAT"

Here's my configure string:

configure --enable-apc --with-php-config=/path/to/php-config
--with-apxs=/path/to/apxs

Expected result:
----------------
I expected APC to build successfully.




Actual result:
--------------
gcc -DLINUX=22 -DHAVE_SET_DUMPABLE -I/usr/include/gdbm -
DUSE_HSREGEX -I. -I/path/to/APC-3.0.18 -DPHP_ATOM_INC -
I/path/to/APC-3.0.18/include -I/path/to/APC-3.0.18/main -
I/path/to/APC-3.0.18 -I/path/to/php/include/php -
I/path/to/php/include/php/main -
I/path/to/php/include/php/TSRM -
I/path/to/php/include/php/Zend -I/path/to/apache/include -
DAPC_PHP4_STAT -DHAVE_CONFIG_H -g -O2 -c /path/to/APC-
3.0.18/apc_cache.c  -fPIC -DPIC -o apc_cache.lo
/path/to/APC-3.0.18/apc_cache.c: In function 
`apc_cache_expunge':
/path/to/APC-3.0.18/apc_cache.c:318: error: `request_rec' 
undeclared (first use in this function)
/path/to/APC-3.0.18/apc_cache.c:318: error: (Each undeclared 
identifier is reported only once
/path/to/APC-3.0.18/apc_cache.c:318: error: for each 
function it appears in.)
/path/to/APC-3.0.18/apc_cache.c:318: error: syntax error 
before ')' token
make: *** [apc_cache.lo] Error 1

If I add an include statement for "httpd.h" directly to 
apc_cache.c, I am able to build successfully.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-12-30 05:05 UTC] gopalv82 at yahoo dot com
dropping php4 support in -dev
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Fri Oct 30 16:01:23 2020 UTC