简体   繁体   English

memcached 和 php7 的问题,目前的解决方案似乎无法解决

[英]Problem with memcached and php7, can't seem to be solved by current solutions

Hej!嘿!

So as you can read in the title, I have a problem with loading memcached on my server.正如您在标题中看到的那样,我在服务器上加载 memcached 时遇到问题。 OS: Alpine Linux操作系统:阿尔派 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 -v命令。

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. Memcached 应该安装在这里: /usr/lib/php7/modules/memcached.so并且.so.so 文件也在该文件夹中。

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.我运行了memcached -d -u nextcloud以允许我的 Nextcloud 服务器使用它,我不知道这是否正确,但我认为是。

Of course I added extension=/usr/lib/php7/modules/memcached.so in the /etc/php7/php.ini file.当然,我在/etc/php7/php.ini文件中添加了extension=/usr/lib/php7/modules/memcached.so

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å! Hej DA!

Have you installed the php7-pecl-memcached package via apk ?您是否通过apk安装了php7-pecl-memcached package ? I tried that and am able to see both the /usr/lib/php7/modules/memcached.so file and memcached when I run php -m .我试过了,当我运行php -m时,我能够看到/usr/lib/php7/modules/memcached.so文件和memcached

Have you tried apk add php7-memcached instead of php7-pecl-memcached ?您是否尝试过apk add php7-memcached而不是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/我刚刚在 AWS 上启动了一个服务器并使用它运行良好:https://web.archive.org/web/20200528070633/http://75.101.221.6/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM