rka05
(Raghav Agarwal 05)
June 18, 2014, 7:37am
21
Thanks for the suggestion. It will only enable for production not on development environment.
It is working for me. But is there any way by which we can only update changed file from the cache, Not the entire thing.
If I change only one file, then Can I able to get updated data only not update the entire cached data.
I think I am clear.
Hm, I think it’ll be safest for you to just set [font=“Courier New”]opcache.validate_timestamps[/font] back to 1. Be advised that opcache won’t run with optimal performance, as it needs to check every single file for an updated timestamp on each request.
rka05
(Raghav Agarwal 05)
July 17, 2014, 9:20am
23
Hi,
Is there any way, I disable opcache in opcache.ini, and enable in my application htacces file.
Well, opcache.enable is marked as [font="Courier New"]PHP_INI_ALL[/font]. So yes, this should be possible.
rka05
(Raghav Agarwal 05)
July 17, 2014, 11:20am
25
Hi,
Thanks for your reply.
But I am doing the same. But it doesn’t make any effect.
Any idea!
Thanks
Could you perhaps paste the relevant part of your [font="Courier New"].htaccess[/font]?
rka05
(Raghav Agarwal 05)
July 17, 2014, 12:01pm
27
Here is my setting in opcache.ini
opcache.enable=0
opcache.validate_timestamps=1
In my htaccess I use
php_flag opcache.enable On
php_flag opcache.validate_timestamps Off
php_value opcache.blacklist_filename "<path to file>"
Here is my settings in ini and htacces file, Is there any problem?
Looks good to me. Can you check if your [font=“Courier New”]AllowOverride[/font] directive is too restrictive? We’ve discussed the same here …
rka05
(Raghav Agarwal 05)
July 17, 2014, 12:24pm
29
I have set
AllowOverride All
for application directory in my apache configuration.
Oh, wait … can you set [font="Courier New"]validate_timestamps[/font] back to on ? If your expiration time is high this could be the culprit.
rka05
(Raghav Agarwal 05)
July 17, 2014, 12:56pm
31
I changed the [font="Courier New"]validate_timestamps[/font] to On in my htacces file.
But no luck
When I change the above values locally then value for "validate_timestamps" is changed to off, But "opcache.enable" remain off.
Attached file for my local and master opcache settings.
Upon further investigation: It seems opcache must be enabled globally before it can be switched off locally. cf issue #74 .
rka05
(Raghav Agarwal 05)
July 21, 2014, 12:38pm
33
Can we set values of others directives of opcache at runtime.
e.g. I tried to use
php_value opcache.blacklist_filename "<path to the file>""
But it also not work, So it can also not be set at runtime.
And if we can, what settings should I need to do?
I have tested with relative and absolute path for my file, In this file I have write the file folder.
But when I go for phpinfo(), local and global both path are same of blacklist file, default path.
/etc/php.d/blacklistfile
That cannot work since [font="Courier New"]opcache.blacklist_filename[/font] is defined as [font="Courier New"]PHP_INI_SYSTEM[/font], so it can only be set system-wide.
bambinou
(Benoitrivaux)
June 23, 2015, 11:57am
36
Da:Sourcerer,
This is the only thread I have found about Yii and OpCache, when I have recompiled PHP and added opcache(with php 5.5 all my page links stopped working(in yii 1.1).
I am not getting : No input file specified each time a link is clicked anywhere in the whole app.
I have this setup in my htaccess file:
Options +FollowSymLinks
IndexIgnore */*
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
Someone suggested I add a "?" after the "$ index.php/" which helped, but is this the right way?
Any idea why please?
Thank you,
Ben