|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59445 APC debug mode is enabled by default
Submitted: 2010-10-01 13:33 UTC Modified: 2011-04-13 18:50 UTC
From: Assigned:
Status: Closed Package: APC (PECL)
PHP Version: 5.3.2 OS: Ubuntu 10.04
Private report: No CVE-ID: None
 [2010-10-01 13:33 UTC]
We started seeing our production server logs explode in size after deploying APC 3.1.5-dev. This is because lots of APC debugging info started filling up the logs.

It appears that __DEBUG_APC__ is being set to 1 by default if $PHP_APC_DEBUG is not == "no".

Reproduce code:
Build APC from trunk, using the following config line:
./configure --enable-apc --with-php-config=/usr/local/moontoast/bin/php-config

Expected result:
I do not expect to see debug info in the Apache error logs. I expect only to see debug info if I build APC with --enable-apc-debug.

Actual result:
Look at your Apache error logs. These "errors" were appearing in the standard error log defined in httpd.conf and not in the log defined for our virtual host.

We are seeing lots of lines that look like this in our Apache error logs:

1. h->opened_path=[/usr/local/moontoast/share/php/symfony-1.3.4/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine.php]  h->filename=[/usr/local/moontoast/share/php/symfony-1.3.4/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine.php]


loader (last revision 2012-01-17 19:16 UTC) by dbarona at nexura dot com)

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-10-05 10:32 UTC]
Please try with r304097, I just checked in a possible fix, although I'm not familiar with M4
 [2011-01-12 16:00 UTC] jatu at hqcodeshop dot fi
On APC 3.1.7 my screen is still filled with garbage:

Notice: Unknown: 1. h->opened_path=[null] h->filename=[/usr/share/phpMyAdmin/index.php] in Unknown on line 0
Notice: Unknown: 2. h->opened_path=[/usr/share/phpMyAdmin/index.php] h->filename=[/usr/share/phpMyAdmin/index.php] in Unknown on line 0
Notice: Unknown: apc_cache_make_file_entry: entry->data.file.filename is [/usr/share/phpMyAdmin/index.php] in Unknown on line 0
Notice: Unknown: Inserting [/usr/share/phpMyAdmin/index.php] in Unknown on line 0

I found the fix. You just have to force the debug off. The configure --enable-apc-debug=no does not seem to do it.

1) wget
2) tar zxf APC-3.1.7.tgz ; cd APC-3.1.7
3) phpize
4) ./configure --enable-apc-debug=no --enable-apc-filehits=no --enable-apc-spinlocks=no --enable-apc-memprotect=no --enable-apc-pthreadmutex=yes --enable-apc-pthreadrwlocks=no
5) patch -p0 <<EOT
--- config.h.orig       2011-01-12 22:51:34.000000000 +0200
+++ config.h    2011-01-12 22:51:43.000000000 +0200
@@ -98,4 +98,4 @@
 #define STDC_HEADERS 1
 /* */
-#define __DEBUG_APC__ 1
+#undef __DEBUG_APC__
6) make
7) make test
8) make install
 [2011-02-10 04:57 UTC] niklas dot laxstrom at gmail dot com
I would appreciate if this there would actually be a release 
where this is fixed, so that new people like me don't bump 
into this.
 [2011-04-13 12:27 UTC]
Present in 3.1.7.
 [2011-04-13 12:28 UTC]
Sorry, forgot the important bit:

If compiling is not an option, roll back to stable: pecl 
install -f APC-3.1.6
 [2011-04-13 18:50 UTC] pierre dot php at gmail dot com
This bug has been fixed in SVN.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on

In case this was a website problem, the change will show
up on the website in short time.
Thank you for the report, and for helping us make PECL better.

PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC