ElkArte Community

Title: APCu not detected 1.0.9
Post by: badmonkey on December 27, 2016, 03:21:55 pm
APCu shows up in phpinfo.  It does not show up in the ACP Caching area for 1.0.9.  Interestingly enough, it does show (and appears to work) in 1.1b4. 

apcu version 5.1.7
php version 7.0.14


Anyone know what's going on?   :D
Title: Re: APCu not detected 1.0.9
Post by: emanuele on December 27, 2016, 05:19:06 pm
It could be because 1.0 tests for function_exists('apc_store') even for apcu?
Dunno, I didn't work that much on that code, maybe @Spuds knows better. O:-)
Title: Re: APCu not detected 1.0.9
Post by: Spuds on December 27, 2016, 06:35:19 pm
A mystery!

I'm running those same PHP and APCu versions on one of my sites and it is showing up fine in both places.   If you installed APCu "later" did you restart php as well?  For me it shows up under admin -> support and in the available cache options.
Title: Re: APCu not detected 1.0.9
Post by: Spuds on December 27, 2016, 06:44:29 pm
Also thinking about it I also installed php-apcu-bcl ... or the backwards compatibility package .. along with php-apcu, perhaps that is required?
Title: Re: APCu not detected 1.0.9
Post by: badmonkey on December 27, 2016, 07:20:25 pm
Quote from: Spuds – Also thinking about it I also installed php-apcu-bcl ... or the backwards compatibility package .. along with php-apcu, perhaps that is required?

Good call.  Sure did but that's certainly an important detail. 

On the b4 sites apcu shows as one of the options in the dropdown, as you pointed out.  On the 1.0 it isn't an option at all, nor does it display as detected. 

Restarting is another important detail.  I'll try that again.  Even though it should have worked before, no harm in doing it again.  Stranger things have happened.  Especially when it's something I'm doing.  Lol
Title: Re: APCu not detected 1.0.9
Post by: badmonkey on December 28, 2016, 11:31:31 am
Fixed.  Here was the solution for me, if it should help anyone.

In php.ini:

extension=apcu.so
extension=apc.so
apc.enabled=1
apc.shm_size =

"extension=apc.so" must come AFTER "extension=apcu.so".  The cache is now working!  :)
Title: Re: APCu not detected 1.0.9
Post by: ahrasis on December 28, 2016, 09:30:13 pm
Good to know you have resolve it. And thanks for sharing its solution too.
Title: Re: APCu not detected 1.0.9
Post by: badmonkey on December 30, 2016, 08:48:15 am
Quote from: ahrasis – Good to know you have resolve it. And thanks for sharing its solution too.

Glad to do it.  The solution came from one little dark corner of the web.  Perhaps this will make it more available/easier to find for someone. 

I only wish I had more expertise to contribute to elk.  Alas, I'm happy to give what I can.  ;)