|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59900 Blank HTML output (php crash?) when combining APC + WP SuperCache
Submitted: 2011-08-18 16:47 UTC Modified: 2013-02-18 00:35 UTC
Avg. Score:4.0 ± 1.0
Reproduced:0 of 1 (0.0%)
From: kennedy dot greg at gmail dot com Assigned:
Status: No Feedback Package: APC (PECL)
PHP Version: 5.3.6 OS: FreeBSD
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
36 - 26 = ?
Subscribe to this entry?

 [2011-08-18 16:47 UTC] kennedy dot greg at gmail dot com
I have a web server with Wordpress installed.  When combining pecl-apc + the Wordpress "WP SuperCache" plugin, I frequently get all-blank HTML pages returned.  Restarting Apache fixes the problem temporarily but it always returns.  Strangely the problem only occurs on a sub-hosted WP installation... my base one is OK (e.g. "" install works OK, but "" totally separate installation crashes out).

Following the trail of required PHP statements led me to wp-cache-phase1.php, for which line 13 is called and does not return.
include( WPCACHEHOME . 'wp-cache-base.php');

Contents of wp-cache-base.php are pasted in full in the Reproduce Code section.  Strangely if I modify wp-cache-base.php (say, to add an "echo") the site makes a temporary reappearance.  Probably apc has been asked to recache due to a modified file, and it worked OK that time.

I have heard rumors of APC not correctly handling class_exists.  This blog post from 2006 details one solution to the problem - essentially asking apc to filter out the problem files.  But that's hardly a bugfix : )

Reproduce code:
# cat wp-cache-base.php 
$known_headers = array("Last-Modified", "Expires", "Content-Type", "Content-type", "X-Pingback", "ETag", "Cache-Control", "Pragma");

if (!class_exists('CacheMeta')) {
        class CacheMeta {
                var $dynamic = false;
                var $headers = array();
                var $uri = '';
                var $post = 0;


Expected result:
HTML output of some sort : )

Actual result:
Nothing.  Blank page.  No errors in apache log, nothing printed to web browser.  Probably, PHP crashes, but I don't know where to retrieve the log.  I'd post it if I did : )

Running from the command line (`php index.php`) completes fine 100% of the time, so that's not much help.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-08-18 16:56 UTC] kennedy dot greg at gmail dot com
Output from phpinfo()... I have heard rumors of include_once_override=1 causing issues, but as you can see that's disabled.

APC Support	enabled
Version 	3.1.9
APC Debugging 	Disabled
MMAP Support 	Enabled
MMAP File Mask 	no value
Locking type 	File Locks
Serialization Support 	php
Revision 	$Revision: 308812 $
Build Date 	Jun 17 2011 09:25:18

Directive	Local Value	Master Value
apc.cache_by_default	On	On
apc.canonicalize	On	On
apc.coredump_unmap	Off	Off
apc.enable_cli	Off	Off
apc.enabled	On	On
apc.file_md5	Off	Off
apc.file_update_protection	2	2
apc.filters	no value	no value
apc.gc_ttl	3600	3600
apc.include_once_override	Off	Off
apc.lazy_classes	Off	Off
apc.lazy_functions	Off	Off
apc.max_file_size	1M	1M
apc.mmap_file_mask	no value	no value
apc.num_files_hint	1000	1000
apc.preload_path	no value	no value
apc.report_autofilter	Off	Off
apc.rfc1867	Off	Off
apc.rfc1867_freq	0	0
apc.rfc1867_prefix	upload_	upload_
apc.rfc1867_ttl	3600	3600
apc.serializer	default	default
apc.shm_segments	1	1
apc.shm_size	32M	32M
apc.slam_defense	On	On
apc.stat	On	On
apc.stat_ctime	Off	Off
apc.ttl	0	0
apc.use_request_time	On	On
apc.user_entries_hint	4096	4096
apc.user_ttl	0	0
apc.write_lock	On	On
 [2011-08-24 09:23 UTC] kennedy dot greg at gmail dot com
The following did not work to fix my issue:


This DOES work(around), but obviously I would prefer a "real" resolution to the bug:
 [2011-09-19 00:27 UTC] mcs at sunwave dot net
I've also had this issue - but switching to the "W3 Total Cache" plugin resolved that issue.

It's also a much better WP plugin with many more options.
 [2012-04-13 09:11 UTC]
Please try using APC 3.1.10
 [2012-04-13 09:11 UTC]
-Status: Open +Status: Feedback
 [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-2022 The PHP Group
All rights reserved.
Last updated: Sat Jan 22 22:03:37 2022 UTC