0

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?

Charles
  • 50,943
  • 13
  • 104
  • 142
user20955
  • 2,552
  • 4
  • 24
  • 23

4 Answers4

4

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
  • 846
  • 2
  • 10
  • 13
  • It works for me, on Centos 5 x86_64 with xcache installed and compiled from source. Avoid installing xcache with easyapache - it won't let you disable admin for xcache! – adrian7 Jan 24 '12 at 12:38
3

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
  • 28,925
  • 4
  • 72
  • 77
0

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
  • 12,790
  • 2
  • 41
  • 42
0

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.

Grey Panther
  • 12,870
  • 6
  • 46
  • 64
  • Maybe there is a reason that he wants both together? Because it is entirely possible that he wants to use the opcode cache of Zend Optimizer+ and the shmem component of Xcache. – demonkoryu Mar 04 '13 at 14:40