Alternative PHP Cache (APC) Not Compatible With Zend Optimizer

This problem happened on my VPS after I installed Alternative PHP Cache (APC). I also already had Zend Optimizer installed on the same VPS. After I installed APC, my WordPress blog showed strange behavior. Sometimes I got Error 500 Internal Server Error, and sometimes I got a PHP fatal error.

Here is the error message:

Fatal error: Cannot run code from this file in conjunction with non encoded files in /home/xxxx/public_html/wp-includes/compat.php on line 66

As I tried to find the solution on Google, there are a lot of others complaining about the same thing. You may need to read the details on faqs.org as it clearly states that APC doesn’t work with Zend Optimizer.

So the solution was I had to choose one of them. And I chose APC since it is needed by W3 Total Cache for my WordPress blog. Since I have WHM root access, I turned off Zend Optimizer from EasyApache (Apache Update), and recompiled everything to make sure Zend Optimizer was removed. Now my blogs are working normally again.