Comments (7)
This is a feature not a bug. opcache.enable is PHP_INI_SYSTEM, not PHP_INI_PERDIR.
from zendoptimizerplus.
hmm... not a feature for hosting environment ;-)
from zendoptimizerplus.
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.
Ok thx for the reply I have already done it in the vhost but a regex for the blacklist would be great.
from zendoptimizerplus.
It must be fixed. Please verify and reopen if you see any problems.
from zendoptimizerplus.
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.
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 1According 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)
- Failed to compile on PHP 5.6 HOT 3
- Opcache crashed with PHP7 HOT 6
- current_wasted_percentage > max, restart_pending=1 but no restart HOT 4
- Error for make HOT 3
- No support for mod-itk? HOT 3
- the same cached and misses files bug HOT 11
- E_WARNING: Cannot modify header information - headers already sent by
- opcache_enabled automatically turns false HOT 2
- pfsockopen - when using opcache ,pfsockopen returns empty when server initiative to disconnect the current connection HOT 1
- 2 different files required w/ same relative path resolve to one file HOT 1
- Don't 7.0.5 work on PHP 5.4.45 ?
- OpCache Constantly Restarting Itself
- Php 7.0.19 call to undefined function exception despite defined
- Frequent PHP errors
- PHP 5.2 with OPcache and ZendOptimizer v.3.3
- Using opcache in command line HOT 1
- Feature request: opcache_evict HOT 1
- How to serialize op_array ?
- Opcache optimisation
- zend_compile_file use of uninitialized memory on second request HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zendoptimizerplus.