• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Resolved Problems with installing memcached for PHP 8.0

Martin73

Basic Pleskian
I used the following instructions for installing memcached and changed 7.4 to 8.0:

Code:
apt install memcached autoconf automake gcc libmemcached-dev libhashkit-dev pkg-config plesk-php*-dev zlib1g-dev
/opt/plesk/php/8.0/bin/pecl install memcached
echo "extension=memcached.so" > /opt/plesk/php/8.0/etc/php.d/memcached.ini
plesk bin php_handler --reread
service plesk-php80-fpm restart
service apache2 restart
/opt/plesk/php/8.0/bin/php -m | grep memcached

But after the last step I get the following error message:
Code:
PHP Warning:  PHP Startup: Unable to load dynamic library 'memcached.so' (tried: /opt/plesk/php/8.0/lib/php/modules/memcached.so (/opt/plesk/php/8.0/lib/php/modules/memcached.so: cannot open shared object file: No such file or directory), /opt/plesk/php/8.0/lib/php/modules/memcached.so.so (/opt/plesk/php/8.0/lib/php/modules/memcached.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Does anyone have an idea for the reason. The file memcached.so doesn't exist on my server, but how can I initialize it?

OS: Ubuntu 20.04.3 LTS
Plesk: Obsidian 18.0.40
 
You are right, there is an error. What can I do? :confused:
PHP Warning: PHP Startup: Unable to load dynamic library 'memcached.so' (tried: /opt/plesk/php/8.0/lib/php/modules/memcached.so (/opt/plesk/php/8.0/lib/php/mod ules/memcached.so: cannot open shared object file: No such file or directory), / opt/plesk/php/8.0/lib/php/modules/memcached.so.so (/opt/plesk/php/8.0/lib/php/mo dules/memcached.so.so: cannot open shared object file: No such file or directory )) in Unknown on line 0
pecl/memcached is already installed and is the same as the released version 3.1. 5
install failed
 
After step
Code:
/opt/plesk/php/8.0/bin/pecl install memcached
PHP memcached module compilation process should be completed without any errors. There is no point in taking subsequent steps without successfully completing this step. I asked about errors in this step.

I suppose that you have error like
Code:
ERROR: `phpize' failed
In this case, you have to install additional package:
Code:
# apt install plesk-php80-dev
Or do you have another error on this step of module compilation?
 
It's already installed. This is the message:
Code:
# apt install plesk-php80-dev
plesk-php80-dev is already the newest version (8.0.13-ubuntu.20.04.211119.1249).
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
# /opt/plesk/php/8.0/bin/pecl install memcached
pecl/memcached is already installed and is the same as the released version 3.1.5
There is no other error. Memcached for PHP 7.4 is working fine. I don't understand the problems for PHP 8.0.
 
It's already installed. This is the message:
Code:
# apt install plesk-php80-dev
plesk-php80-dev is already the newest version (8.0.13-ubuntu.20.04.211119.1249).
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
# /opt/plesk/php/8.0/bin/pecl install memcached
pecl/memcached is already installed and is the same as the released version 3.1.5
There is no other error. Memcached for PHP 7.4 is working fine. I don't understand the problems for PHP 8.0.
Do you have this module loaded now? Please check it with

# /opt/plesk/php/8.0/bin/php -m | grep memc
 
This is the result:
Code:
# /opt/plesk/php/8.0/bin/php -m | grep memc
PHP Warning:  PHP Startup: Unable to load dynamic library 'memcached.so' (tried: /opt/plesk/php/8.0/lib/php/modules/memcached.so (/opt/plesk/php/8.0/lib/php/modules/memcached.so: cannot open shared object file: No such file or directory), /opt/plesk/php/8.0/lib/php/modules/memcached.so.so (/opt/plesk/php/8.0/lib/php/modules/memcached.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
 
Please, make sure that command:

Code:
# /opt/plesk/php/8.0/bin/pecl install memcache

is completed with the following message:

Code:
Build process completed successfully
Installing '/opt/plesk/php/8.0/lib64/php/modules/memcached.so'
install ok: channel://pecl.php.net/memcached-3.1.5
configuration option "php_ini" is not set to php.ini location
You should add "extension=memcached.so" to php.ini

As you can see, compiled module should be located in /opt/plesk/php/8.0/lib64/php/modules/memcached.so but not in /opt/plesk/php/8.0/lib/php/modules/memcached.so
 
That was a difficult birth. I uninstalled memcached and started from scratch. The php.ini was the cause. Here are the steps for the installation:
Code:
apt install memcached autoconf automake gcc libmemcached-dev libhashkit-dev pkg-config plesk-php*-dev zlib1g-dev
/opt/plesk/php/8.0/bin/pecl install memcached
add "extension=memcached.so" to php.ini
Following:
Code:
echo "extension=memcached.so" > /opt/plesk/php/8.0/etc/php.d/memcached.ini
plesk bin php_handler --reread
service plesk-php80-fpm restart
service apache2 restart
/opt/plesk/php/8.0/bin/php -m | grep memcached
The compiled module is located in /opt/plesk/php/8.0/lib/php/modules/memcached.so. There is no lib64 folder.
Many thanks for your help!!!
 
Not sure any of this applies, but I see the extension installed in my PHP info.

/opt/plesk/php/8.0/etc/php.d/mbstring.ini, /opt/plesk/php/8.0/etc/php.d/memcached.ini,

But I don't see a configuration listing for it on that info page.

????
 
Back
Top