tags:

views:

1137

answers:

4

Hello, i have installed xCache and Zend optimizer in same time and it gives me PHP Fatal error: [Zend Optimizer] Zend Optimizer 3.3.3 is incompatible with XCache 1.2.1 in Unknown on line 0

I have lines in installation document that i should include zend php.ini file to normal php.ini and ansure that xCache runs befor Zend Optimizer.

My question is how i include files in php.ini and how i can be sure that xCache run before Zend Optimizer?

A: 

The classic joke: "doctor, it hurts when I do X!" - "so don't do X"

A quick look seems to indicate that both products operate on the PHP opcode level and it might very well be, especially given the error message, that they are incompatible.

Cd-MaN
+1  A: 

All of the PHP opcode caches are mutually exclusive - including: xCache, Zend Optimizer, APC, or eAccelerator. Don't try to use them at the same time.

hobodave
A: 

You can ensure xcache is loaded first by putting the xcache ini settings before the Zend Optimizer ini settings. There's no other way I know of...

ie. make sure [xcache] and every other [xcache...] section in the ini is before the line loading Zend Optimizer (which, on Linux should like kind of like the following : zend_extension=/usr/local/Zend/lib/ZendOptimizer.so).

But as mentioned in the other replies, it might not be advisable to use both XCache and Zend Optimizer together, especially since there have been compatibility problems in the past. If you can do without Zend Optimizer (ie. when not using Zend Guard protected scripts), it's safe to remove the relevant config lines from php.ini.

wimvds
A: 

I've run across this same issue. FWIW Zend Optimizer (excluding Zend Platform) is not an opcode cacher like XCache is. I've had success running both at the same time. The trick is to replace the following line:

extension=xcache.so

With this:

zend_extension=/path/to/xcache.so

(note that the zend extension may require the full path to your xcache.so library)

Hope this helps.

matt