Git Product home page Git Product logo

Comments (7)

TerryE avatar TerryE commented on August 28, 2024

This is a feature not a bug. opcache.enable is PHP_INI_SYSTEM, not PHP_INI_PERDIR.

from zendoptimizerplus.

HLeithner avatar HLeithner commented on August 28, 2024

hmm... not a feature for hosting environment ;-)

from zendoptimizerplus.

TerryE avatar TerryE commented on August 28, 2024

Sorry, I was too terse. (And a health warning -- I am only a community developer, and not part of the core team so one of these might qualify the following.) You need to refer to How to change configuration settings:

php_value name value Sets the value of the specified directive. Can be used only with PHP_INI_ALL and PHP_INI_PERDIR type directives.

"Per Dir" INI settings can be set via .htaccess and .user.ini files and are typically processed on a per-request basis by an extension. System directives are processed once on startup, and as currently architected, OPcache can only be enable or disabled during startup. So what you want is an enhancement. At the moment the black list file is used to achieve this type of per-dir filtering, but again this is read at startup, and cannot be reread without bouncing apache or equiv.

IMO, the lack of dynamic resource management for OPcache is a functional gap and addressing this would enhance the extension -- e.g. by optionally doing a timestamp check on the blacklist file at request startup if is validate_timestampst>0 and automatically reloading it where necessary. Another alternative would be to have a blacklist=regexp PHP_INI_PERDIR directives, which could be set in an .htaccess file and do what you are seeking. This last would be a fairly simple change to implement.

from zendoptimizerplus.

HLeithner avatar HLeithner commented on August 28, 2024

Ok thx for the reply I have already done it in the vhost but a regex for the blacklist would be great.

from zendoptimizerplus.

dstogov avatar dstogov commented on August 28, 2024

It must be fixed. Please verify and reopen if you see any problems.

from zendoptimizerplus.

azurit avatar azurit commented on August 28, 2024

Still doesn't work in 7.0.2 with PHP 5.3.27. I disabled cache globally in php.ini and wanted to enable it only for one site with this in .htaccess:
php_value opcache.enable 1

According to phpinfo(), opcache is still disabled.

from zendoptimizerplus.

dstogov avatar dstogov commented on August 28, 2024

This is expected behavior.
OPcahce have to be enabled first.
Then it may be disabled for some sites, requests, etc.

You must have errors in your error_log, something like ".. can't be
temporary enabled (it may be only disabled till the end of request)".

Thanks. Dmitry.

On Fri, Nov 1, 2013 at 6:09 PM, azurit [email protected] wrote:

Still doesn't work in 7.0.2 with PHP 5.3.27. I disabled cache globally in
php.ini and wanted to enable it only for one site with this in .htaccess:
php_value opcache.enable 1

According to phpinfo(), opcache is still disabled.


Reply to this email directly or view it on GitHubhttps://github.com//issues/74#issuecomment-27567793
.

from zendoptimizerplus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.