I use the following set up:

  • PHP Version 5.2.17
  • Apache/2
  • Zend Optimizer v3.3.3
  • Drupal 7.8

As far as I read other articles and questions, Zend Optimizer doesn't do any good neither for PHP5 nor for D7.

I would like to use APC as PHP cache but APC is not compatible with Zend Optimizer.

Can I disable Zend Optimizer for selected subdomains ?


  • sub1.example.com redirects to an app that requires Zend Optimizer
  • sub2.example.com redirects to a Drupal app that doesn't require Zend Optimizer (I would like to disable Zend Optimizer for this subdomain)

Webhosting talk seems to think you may be able to use the php_value flag in your .htaccess (or VirtualHost def) in order to selectivly disable it in certain hosts:

php_value zend_optimizer.optimization_level = 0


  • Thank you, I tried this on one subdomain and included php_value in my .htaccess but it didn't help disable Zend Optimizer I am afraid. – Refineo Sep 21 '11 at 17:40
  • I checked this again and used this php_value in php.ini instead of .htaccess then after httpd -k restart it disabled all Zend Optimizer optimization passes but this was for the whole server not for one subdomain. I am looking further for a solution. – Refineo Sep 21 '11 at 18:16
  • I've tried it again in my .htaccess but without success. What should be done in order to enable setting php_value in .htaccess ? – Refineo Sep 21 '11 at 20:17
  • Instead of putting it in your .htaccess, try php_admin_value in your virtual host definition. Some settings are restricted to where they can be set from; the php/zend documentation leaves a bit to be desired on this front, unfortunately! – Kirrus Sep 21 '11 at 22:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.