php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62851 APC 3.1.12 Causes Functions to Become Undefined
Submitted: 2012-08-18 06:32 UTC Modified: 2013-02-18 00:35 UTC
Votes:15
Avg. Score:4.5 ± 0.9
Reproduced:14 of 15 (93.3%)
Same Version:9 (64.3%)
Same OS:8 (57.1%)
From: pinnaclecomps at gmail dot com Assigned:
Status: No Feedback Package: APC (PECL)
PHP Version: 5.4.6 OS: Ubuntu
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2012-08-18 06:32 UTC] pinnaclecomps at gmail dot com
Description:
------------
I upgraded to APC 3.1.12 and began having problems with PHP thinking that 
functions that should be defined are undefined, including standard PHP function 
as 
well as user defined functions. Restarting FPM briefly fixes the issues. 
Disabling 
APC or downgrading to 3.1.11 completely fixes the problem.

Something as simple as this fails:
define("CONSTANT", "Hello world.");

Output:
PHP Fatal error:  Call to undefined function define() in 
/home/test/www/index.php 
on line 1

APC Config:
[apc]
apc.enabled = 1
apc.shm_segments = 1
apc.shm_size = 256M
apc.ttl=7200
apc.user_ttl=7200


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-08-19 14:55 UTC] rasmus@php.net
-Status: Open +Status: Feedback
 [2012-08-19 14:55 UTC] rasmus@php.net
What kind of environment are you in? I am unable to reproduce this here using 
both Apache prefork, and the built-in php -S server.
 [2012-08-19 19:34 UTC] helvinhan at 163 dot com
[19-Aug-2012 19:10:28 UTC] PHP Fatal error:  Call to undefined function 
7_1345400082D_299_1345400369() in /data/webroot/forum.php on line 10
 [2012-08-19 19:41 UTC] rasmus@php.net
Please include your serving environment if you comment on this bug. Web server, 
threaded/multi-threaded (worker vs. prefork if you are using Apache2).
 [2012-08-19 22:04 UTC] pinnaclecomps at gmail dot com
I'm using nginx 1.2.2 with the fpm-fcgi server API. The bug doesn't appear right 
away, but if I keep requesting pages then eventually it shows up.
 [2012-08-20 10:32 UTC] vytenis dot darulis at gmail dot com
Same here. PHP 5.4.6, Ubuntu 12.04, FPM with nginx 1.1.19
 [2012-08-20 10:34 UTC] pajoye@php.net
Only to be sure, did you compile PHP in non thread safe (default when built for CLI, FCGI or FPM)?
 [2012-08-20 10:39 UTC] vytenis dot darulis at gmail dot com
Yes, this is non-TS build

./configure --prefix=/usr/local --enable-fpm --disable-cgi --with-fpm-user=www-
data --with-fpm-group=www-data --with-config-file-path=/etc/php5/fpm --with-
config-file-scan-dir=/etc/php5/fpm/conf.d --sysconfdir=/etc --localstatedir=/var 
--mandir=/usr/share/man --disable-debug --with-regex=php --with-gd --enable-gd-
native-ttf --disable-static --with-layout=GNU --with-pear=/usr/local/share/php -
-enable-fileinfo --enable-hash --enable-json --with-bz2 --enable-ctype --
without-db4 --without-gdbm --with-iconv --enable-mbstring --with-pcre-regex --
enable-mysqlnd --with-mysql-sock=/var/run/mysqld/mysqld.sock --with-
mysql=mysqlnd --with-mysqli=mysqlnd --enable-pdo=mysqlnd --with-pdo-
mysql=mysqlnd --without-pdo-sqlite --enable-sockets --with-zlib --enable-zip --
without-mm --without-sybase-ct --without-mssql --without-sqlite3 --without-
sqlite --with-curl=/usr --enable-simplexml --with-png-dir=/usr/lib/x86_64-linux-
gnu/ --with-jpeg-dir=/usr/lib/x86_64-linux-gnu/ --with-freetype-dir --with-
openssl --with-mhash --with-mcrypt --with-t1lib --disable-zend-multibyte
 [2012-08-20 11:15 UTC] pinnaclecomps at gmail dot com
My PHP is compiled as non-thread safe as well
 [2012-08-21 17:56 UTC] adrianbjones at gmail dot com
I also have a non threadsafe PHP 5.4.6 on Debian with Apache2 and having the same problem.
 [2012-09-01 21:25 UTC] nshahzad at gmail dot com
I am also seeing this problem, on Ubuntu 12.04, with PHP5.4 from dotdeb. Shows 
up after a variable amount of time.

-----
PHP 5.4.6-1~dotdeb.0 (cli) (built: Aug 19 2012 08:45:58) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
-----
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04.1 LTS"
-----
 [2012-09-01 21:28 UTC] nshahzad at gmail dot com
And, I'm also running APC, version 3.1.12
 [2012-09-04 10:34 UTC] vincent at giersch dot fr
Same bug with :
- APC 3.1.12
- PHP 5.4.6-1~dotdeb.0

Error log :
2012/09/04 11:47:18 [error] 19598#0: *1164880 FastCGI sent in stderr: "PHP 
message: PHP Fatal error:  Call to undefined function 
function_exists() in /var/www/info/haproxy-info.php on line 1" while reading 
response header from upstream, client: 10.42.0.254, server: , 
request: "HEAD /haproxy-info.php HTTP/1.0", upstream: 
"fastcgi://unix:/var/run/php5-fpm.sock:"
 [2012-10-19 05:59 UTC] pinnaclecomps at gmail dot com
I've been running 3.1.13 for a while now and haven't had this problem so something 
that was reverted must have fixed it. Just something for the devs to be aware of 
if they plan on bringing back those reverted commits in the future.
 [2013-02-18 00:35 UTC] pecl-dev at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 02:01:30 2024 UTC