php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44747 using PHP 4 optimization leaves request_rec undeclared in apc_cache_expunge
Submitted: 2008-04-16 18:53 UTC Modified: 2008-04-16 19:00 UTC
From: toconnell at southcomm dot com Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 4.4.8 OS: Fedora Core 3
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: toconnell at southcomm dot com
New email:
PHP Version: OS:

 

 [2008-04-16 18:53 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

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-04-16 19:00 UTC] toconnell at southcomm dot com
Sorry. I meant to post this to the PECL bug system.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Nov 21 21:00:01 2025 UTC