How to install APCu on php7x

Hi there.

Im new in opensuse. I have installed an Owncloud, then i must install some module for cache memmory. So, APCu require in system.

Please tell me, b’couse im fighting 3 days now…how properly install this. Below I pasted what I did till now, and errors. This is not bug of application Owncloud.
I did →

zypper addrepo https://download.opensuse.org/repositories/home:munix9:php:php7/php71_openSUSE_Leap_42.3/home:munix9:php:php7.repo
zypper refresh
zypper install php7-apcu

In file …/owncloud/config/config.php added:


  'memcache.local' => '\OC\Memcache\APCu',
 'memcache.locking' => '\OC\Memcache\APCu',
 'redis' => array(
 'host' => 'localhost',
 'port' => 6379,
 ),


and also in php.ini added


'extension' = apcu.so


and no effect, still I have a blank page of OC with error message:

*“Memcache \OC\Memcache\APCu not available for local cache Is the matching PHP module installed and enabled?”

*Please help…

Have you enabled your module?

Maybe something like the following (I’m guessing what the module name might be)

ap2enmod apcu

Followed by restarting your webserver (I’m guessing you’re installed on Apache)

systemctl restart apache2

TSU

“ap2enmod apcu” gets an error:

if 'ap2enmod' is not a typo you can use command-not-found to lookap the package that contains it, like this  
cnf ap2enmod

of course those command also brings error like: “ap2enmod not found”

Yes, I’m working on VM of opensuse 42.3

Hi
A typo, it’s a2enmod

Ok the command works, but still no efect. I changed /owncloud/config.php and pasted only

memcache.local' => '\OC\Memcache\APCu',

Did someone do this ealiser ?

First,
Pls post how you installed Owncloud… a URL to your reference, a guide, a download, whatever.
Reason is because I’m a bit surprised that your Ownloud is installing memcache and redis… I install those only in large, complex network applications and doubt there is any need for those when deploying a single server app(I assume you’re not installing a farm of Owncloud).

Also,
After installing Apache modules, you should always list your Apache modules to verify that they’re enabled

a2enmod -l

TSU

Am Wed, 04 Oct 2017 17:06:01 +0000 schrieb cezarylee:

> Hi there.
>
> Im new in opensuse. I have installed an Owncloud, then i must install
> some module for cache memmory. So, APCu require in system.
>
> Please tell me, b’couse im fighting 3 days now…how properly install
> this. Below I pasted what I did till now, and errors. This is not bug of
> application Owncloud.
> I did →
>
>
> Code:
> --------------------
> zypper addrepo http://tinyurl.com/ya692xd7
> zypper refresh zypper install php7-apcu
>
Why do you not use package from server:php:extensions:php7?
This is also the package-/version-source for Tumbleweed.

Regards
Eric

Here is what I did. Got it working on 42.2.
zypper addrepo https://download.opensuse.org/repositories/server:php:extensions:php7/openSUSE_Leap_42.2/server:php:extensions:php7.repo
zypper refresh
zypper install php7-APCu

a2enmod php7-apcu

systemctl restart apache2

add memcache.local’ => ‘\OC\Memcache\APCu’, to owncloud/config/config.php

fix permissions on config.php as I had edited with a different user account.

Working great now. Thanks for this thread. It helped.