Closed (won't fix)
Project:
Alternative PHP Cache
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Jul 2011 at 23:42 UTC
Updated:
21 Mar 2012 at 16:38 UTC
This is the same issue as #1194808: drush cc - does not clear cache.
[waverate@server-2 ~]$ drush cc all
WD php: Warning: apc_cache_info(): No APC info available. Perhaps APC is not enabled? Check apc.enabled in your ini file in DrupalAPCCache->clear() (line 239 of /var/www/html/drupal-7.4/sites/all/modules/apc/drupal_apc_cache.inc).
WD php: Warning: apc_cache_info(): No APC info available. Perhaps APC is not enabled? Check apc.enabled in your ini file in DrupalAPCCache->clear() (line 239 of /var/www/html/drupal-7.4/sites/all/modules/apc/drupal_apc_cache.inc).
WD php: Warning: apc_cache_info(): No APC info available. Perhaps APC is not enabled? Check apc.enabled in your ini file in DrupalAPCCache->clear() (line 239 of /var/www/html/drupal-7.4/sites/all/modules/apc/drupal_apc_cache.inc).
WD php: Warning: apc_cache_info(): No APC info available. Perhaps APC is not enabled? Check apc.enabled in your ini file in DrupalAPCCache->clear() (line 239 of /var/www/html/drupal-7.4/sites/all/modules/apc/drupal_apc_cache.inc).
'all' cache was cleared
apc_cache_info(): No APC info available. Perhaps APC is not enabled? Check apc.enabled in your ini file in DrupalAPCCache->clear() (line 239 of /var/www/html/drupal-7.4/sites/all/modules/apc/drupal_apc_cache.inc).
apc_cache_info(): No APC info available. Perhaps APC is not enabled? Check apc.enabled in your ini file in DrupalAPCCache->clear() (line 239 of /var/www/html/drupal-7.4/sites/all/modules/apc/drupal_apc_cache.inc).
apc_cache_info(): No APC info available. Perhaps APC is not enabled? Check apc.enabled in your ini file in DrupalAPCCache->clear() (line 239 of /var/www/html/drupal-7.4/sites/all/modules/apc/drupal_apc_cache.inc).
apc_cache_info(): No APC info available. Perhaps APC is not enabled? Check apc.enabled in your ini file in DrupalAPCCache->clear() (line 239 of /var/www/html/drupal-7.4/sites/all/modules/apc/drupal_apc_cache.inc).
apc.php looks like it is working and the Status Report is showing the correct version of APC.
What should I be looking for?
Comments
Comment #1
waverate commentedAlso,
setting.php
Comment #2
waverate commentedSimple fix. Required:
in php.ini.
Comment #3
berkas1 commented#2 worked for me:)
Comment #4
regilero commented#2 worked for me as well.
But I wonder if there's away to give a php.ini file containing php settings to drush, so that the apc_cli gets the same configuration settings as the one I've set in ma apache virtualHost for apache...
Comment #5
regilero commentedWell, in #4 I said it worked. In fact I was wrong. It seems to work, but it's NOT POSSIBLE to flush APC cache from the command line. I fixed my own problems, launching a drushrc.php configuration file with drush -c /path/to/drushrc, set all apc settings in this file to get the same exact configuration for APC in cli mode and in apache mod_php mode. But debuging the drupal_apc_cache.inc source, I can ensure a cache clear from drush won't clear the APC cache for Apache.
What you're flushing is the APC cache for drush envirronement (so anything cached in APC while you was running Drupal in command line).
Some infos about APC and command line here :
* http://stackoverflow.com/questions/911158/how-to-clear-apc-cache-entries
* http://stackoverflow.com/questions/439262/how-can-i-get-php-to-use-the-s...
Comment #6
R.Muilwijk commentedWhen running in CLI mode you do not have access to the shared memory of your webserver/fastcgi PHP instance. So it's not possible to clear it's cache unless you do it with your webserver/fastcgi instance.
This will not be fixed, I might add some documentation on this though.
Comment #7
R.Muilwijk commentedsee newly opened http://drupal.org/node/1278232
Comment #8
jcuzella commentedJust an idea...
It may be possible to work around this by creating a small temporary php script to clear the APC cache in the webserver root, and then hitting the page with drush. Perhaps the best solution would be to have some sort of REST-API call out to Drupal.
Also, I seem to be getting some PHP errors when running drush commands after setting 'apc.enable_cli=1':
Added 'apc.slam_defense = 0' and 'apc.write_lock = 1' to try and get rid of these but they still appeared.
This happens on:
* APC 3.1.3p1
* PHP 5.3.2-1ubuntu4.14
* Ubuntu 10.04.4 LTS (lucid)
Comment #9
jaypan#2 got rid of the errors for me. I have no idea if it fixed anything, as I don't even know what was wrong! But I'm happy just to have the errors gone.