Last APC version seems to ignore .module files

Events happening in the community are now at Drupal community events on www.drupal.org.
joanpc's picture

Hi guys,

I just upgraded my APC version to the 3.1.6 and apc is only caching .php and .inc files. Anyone have the same problem? There's a know way of fixing this?

I will post the solution if i can find it :)

Thanks in advance.

Comments

Definitely interesting.

brianmercer's picture

Definitely interesting. Which PHP version are you using? Through php-fpm?

I tested it and the last

omega8cc's picture

I tested it and the last correctly working version is APC-3.1.4. I'm using php-fpm 5.2.15. It is broken since APC-3.1.5 and I doubt it is Drupal specific. Looks like a bug in recent APC.

yea, test it with different

bennos's picture

yea, test it with different version. The APC Version 3.1.4 works. higher version does not work with drupal.
PHP 5.2.10, Apache 2 prefork and PHP compiled.

I opened a bug with APC

joanpc's picture

Good to know that I'm not alone :)

I opened a bug on the APC site: http://pecl.php.net/bugs/bug.php?id=20690

I just updated php-fpm to the 5.2.16 version with the same results.

Cannot reproduce issue: using php-cgi

perusio's picture

I cannot reproduce the issue being reported. I'm using the php CGI version 5.2.16 from dotdeb. Modules are cached. There's nothing in APC that checks for file extensions. The APC version is 3.1.6.

So I venture that the issue is in php-fpm and not in APC, since that's the difference from my setup and yours.

Previous versions of APC (up

omega8cc's picture

Previous versions of APC (up to 3.1.4) work with PHP-FMP 5.2.14, 5.2.15 and 5.2.16. This is why I don't think it is PHP-FPM fault, but APC bug related to PHP-FPM support.

I tried APC 3.1.6 with php

brianmercer's picture

I tried APC 3.1.6 with php 5.3.2 through php-fpm and it seems to be working normally on php, inc, module, install.

Hmm, I'm treading on shaky ground

perusio's picture

but AFAIK, APC doesn't care how the PHP is interpreted. It's just a file that translates to a set of opcodes by the interpreter and that gets cached.

A diff of the APC source between 3.1.4 and 3.1.5 might help pointing in the right direction.

Have you tried fiddling with apc.filters?

Setting it to apc.filters = +\.module$, for example?

Is not an extension problem

joanpc's picture

Is not an extension problem as I noticed yesterday.

I found that not cached files are all those include_once made by drupal_load() and module_load_include() all "static" inclusions like include_once 'bootstrap.inc' are cached. Just adding an include_once 'watever.module' in the settings.php makes apc to cache the file.

All module files are loaded by drupal_load() so that's the reason why i couldn't find any .module on the cache. All .inc files that are not called "statically" are also ignored by apc.

So by your comments it seems an php-fpm 5.2.* with apc 3.1.6 problem.

perusio: The first think I tried was the same apc.filters regex ;-)

thanks for your comments.

Joan.

Also occurs with apache / mod_php

davej's picture

As bennos noted above, the problem also occurs with apache: it's broken here with apache 2.2.3 prefork / mod_php, PHP 5.2.15, APC 3.1.6 . So not specific to php-fpm.

Dave J

Chiming in

Mixologic's picture

Same issue.
Apache/2.2.17 (FreeBSD) mod_ssl/2.2.17 OpenSSL/0.9.8k DAV/2 mod_fastcgi/2.4.6
PHP Version 5.2.16
mpm prefork

APC 3.1.6 (upgraded yesterday)

I tried out this test:

<?php
$DYNAMIC_INCLUDE_ONCE
= 'DYNAMIC_INCLUDE_ONCE.inc';
include_once
'INCLUDE_ONCE.inc';
include_once
$DYNAMIC_INCLUDE_ONCE;

$DYNAMIC_REQUIRE_ONCE = 'DYNAMIC_REQUIRE_ONCE.inc';
require_once
'REQUIRE_ONCE.inc';
require_once
$DYNAMIC_REQUIRE_ONCE;

?>

And the
include_once $DYNAMIC_INCLUDE_ONCE;

Failed to cache.

Is fixed in the trunk version

joanpc's picture

.. as quoted on the bug report.

I tested-it and it works great. To get and build the svn trunk version:

svn co http://svn.php.net/repository/pecl/apc/trunk apc
cd apc
phpize
./configure
make
make install

APC fixed in trunk (3.1.7)

verikami's picture

:-)) Friends !!!

I had also this "non caching" issue with APC-3.1.6.

Just compiled from trunk, mentioned by joanpc (it's reporting 3.1.7) and it works as expected, so the problem is definitely there.

.v.

That did it for me as

buzzlightyear's picture

That did it for me as well.
Big Thanks!

3.1.8-dev good too

fgm's picture

Same problem here: I upgraded from the debian standard 3.0.x to PECL latest 3.1.6 and hit on that problem.

Upgrading to a 3.1.8.-dev checkout as explained on http://groups.drupal.org/node/113594#comment-369144 made it work again.

Side note: if, on Ubuntu 10.10, you encounter a missing pcre.h error at the make step, you need to install the libpcre3-dev package.

Yes, I had the same issue.

joehudson's picture

Yes, I had the same issue. Had installed Mercury 1.1 on a Linode, made a bunch of configuration changes at the same time (there was my mistake), including upgrading apc and suddenly caching went to pot. I realized apc wasn't doing it's usual thing, but my local install, also upgraded to 3.1.6 didn't show the same problems, so I figured the issue was elsewhere. So glad to finally have this fixed, thanks for the info! I installed the svn version 3.1.8. joy.

Nginx

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: