1

Hej!

So as you can read in the title, I have a problem with loading memcached on my server. OS : Alpine Linux

I've seen that a lot of people have already had this issue but it's always on other OS, and the solutions can't seem to work for me.

There is the problem : I used the php -v command.

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php7/modules/memcached.so' (tried: /usr/lib/php7/modules/memcached.so (Error relocating /usr/lib/php7/modules/memcached.so: php_session_create_id: symbol not found), /usr/lib/php7/modules//usr/lib/php7/modules/memcached.so.so (Error loading shared library /usr/lib/php7/modules//usr/lib/php7/modules/memcached.so.so: No such file or directory)) in Unknown on line 0
PHP 7.3.17 (cli) (built: Apr 16 2020 23:18:12) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.17, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.17, Copyright (c) 1999-2018, by Zend Technologies

Memcached is supposedly installed here : /usr/lib/php7/modules/memcached.so and the .so.so file is also in that folder.

I runned memcached -d -u nextcloud to allow my Nextcloud server to use it, I do not know if it is the correct way, but I think it is.

Of course I added extension=/usr/lib/php7/modules/memcached.so in the /etc/php7/php.ini file.

I can answer at any question asked by persons who want to help me. In any case I will greatly appreciate any help.

Hej då!

ard3s
  • 11
  • 2

2 Answers2

0

Have you installed the php7-pecl-memcached package via apk? I tried that and am able to see both the /usr/lib/php7/modules/memcached.so file and memcached when I run php -m.

Matthew Turland
  • 763
  • 3
  • 11
  • Yes I have installed ```php7-pecl-memcached```. This is what I get when I type ```php -m``` : ```PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php7/modules/memcached.so' (tried: /usr/lib/php7/modules/memcached.so (Error relocating /usr/lib/php7/modules/memcached.so: php_session_create_id: symbol not found), /usr/lib/php7/modules//usr/lib/php7/modules/memcached.so.so (Error loading shared library /usr/lib/php7/modules//usr/lib/php7/modules/memcached.so.so: No such file or directory)) in Unknown on line 0 [PHP Modules] ... memcached ... ``` There is no .so file. – ard3s May 14 '20 at 13:55
  • There is a lot more modules showing but can't put all of them in the comment, only put memcached to show it is there. – ard3s May 14 '20 at 13:58
  • Maybe try uninstalling and reinstalling the `php7-pecl-memcached` package? – Matthew Turland May 14 '20 at 18:53
  • I deleted and added again ```memcached (1.5.20-r0)``` and ```memcached-openrc (1.5.20-r0)``` and ```libmemcached-libs (1.0.18-r4)``` and ```php7-pecl-memcached (3.1.5-r0)```. Doesn't work after that. Is there a command to launch memcached as deamon while I'm using root ? Maybe it's just that it isn't launched properly... – ard3s May 15 '20 at 06:06
  • Are you still receiving the same error after you make those package changes? I need more information than just "didn't work." – Matthew Turland May 17 '20 at 12:16
  • Yes, sorry for the delay, yes I'm still receiving exactly the same errors, which is weird... Maybe the problem comes from ```php7``` itself. – ard3s May 19 '20 at 08:31
0

Have you tried apk add php7-memcached instead of php7-pecl-memcached?

I just spun up a server on AWS and using that worked well: https://web.archive.org/web/20200528070633/http://75.101.221.6/

austinh
  • 1,061
  • 6
  • 13
  • 34
  • I just tried, installed the same package that `php7-pecl-memcached`. Same errors that in my original post. Thanks anyway ^^. – ard3s May 29 '20 at 08:12