• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Resolved php plesk and memcache(d) extension

Hello UFHH01,

1. It still have the issue. Please see the attached file.
2. You didn't answer the question, if you FOLLOWED the rest of the article, as for example: please see the result.

/opt/plesk/php/5.6/bin/pecl install memcached
PHP Warning: PHP Startup: Unable to load dynamic library '/opt/plesk/php/5.6/li b/php/modules/memcached.so' - /opt/plesk/php/5.6/lib/php/modules/memcached.so: c annot open shared object file: No such file or directory in Unknown on line 0
downloading memcached-2.2.0.tgz ...
Starting to download memcached-2.2.0.tgz (70,449 bytes)
.................done: 70,449 bytes
15 source files, building
WARNING: php_bin /opt/plesk/php/5.6/bin/php appears to have a suffix /5.6/bin/ph p, but config variable php_suffix does not match
running: phpize
Configuring for:
PHP Api Version: 20131106
Zend Module Api No: 20131226
Zend Extension Api No: 220131226
libmemcached directory [no] :
building in /tmp/pear-build-root4WQgRn/memcached-2.2.0
running: /tmp/memcached/configure --with-libmemcached-dir=no
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /opt/plesk/php/5.6
checking for PHP includes... -I/opt/plesk/php/5.6/include/php -I/opt/plesk/php/5 .6/include/php/main -I/opt/plesk/php/5.6/include/php/TSRM -I/opt/plesk/php/5.6/i nclude/php/Zend -I/opt/plesk/php/5.6/include/php/ext -I/opt/plesk/php/5.6/includ e/php/ext/date/lib
checking for PHP extension directory... /opt/plesk/php/5.6/lib/php/modules
checking for PHP installed headers prefix... /opt/plesk/php/5.6/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 0.13.5 (ok)
checking for gawk... gawk
checking whether to enable memcached support... yes, shared
checking for libmemcached... yes, shared
checking whether to enable memcached session handler support... yes
checking whether to enable memcached igbinary serializer support... no
checking whether to enable memcached json serializer support... no
checking whether to enable memcached msgpack serializer support... no
checking whether to enable memcached sasl support... yes
checking whether to enable memcached protocol support... no
checking for ZLIB... yes, shared
checking for pkg-config... no
pkg-config not found
configure: error: Please reinstall the pkg-config distribution
ERROR: `/tmp/memcached/configure --with-libmemcached-dir=no' failed

PHP_Settings.jpg phpinfo.jpg Settings.jpg
 
Hi cookkoo,

did you probably forget to install "apt-get install plesk-php56-dev" ? If the package doesn't exist, please post the output of "apt-cache search plesk-php | grep dev".


As well, please post the output of the following command:

/opt/plesk/php/5.6/bin/pecl config-show

and

/opt/plesk/php/5.6/bin/php -v
 
Last edited by a moderator:
Hi cookkoo,

in addition, you could experience issues, because your local PECL configuration at "/root/.pearrc" could already be stored for your the vendor's configuration for your "PHP CLI/CGI binary" and your "php.ini location". In such cases, the command "/opt/plesk/php/N.N/bin/pecl config-show" ( where N.N is the placeholder for your Plesk PHP version 5.2/5.3/5.4/5.5 or 5.6 ) will show as output your ( vendors ) system PHP paths. To correct this issue, you have to perform the commands:

For Plesk PHP version 5.6 :​

/opt/plesk/php/5.6/bin/pecl config-set php_bin /opt/plesk/php/5.6/bin

and​

/opt/plesk/php/5.6/bin/pecl config-set php_ini /opt/plesk/php/5.6/etc/php.ini

Afterwards, please retry your previous PECL installation and report again possible issues:

/opt/plesk/php/5.6/bin/pecl install memcached


Please note, that you should re-change your local PECL configuration to your previous state, after you finished the module installation for a Plesk PHP version, to avoid possible issues/problems with your server PHP version:

pecl config-set php_ini /etc/php5/cli/php.ini
 
Hello UFHH01,

Thank you so much for your kindness and trying to help. Now on putty it display few error. as i am a civil & construction engineer not a programmer. For save your time, Is it possible for you to SSH login to my server and help to config this issue ? If yes, please give me your email address and i will give you SSH credential.
 
Hello UFHH01,

OK. I understand your answer. I will start the point from the top of this page, and the issue as below:

# apt-get install plesk-php56-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
plesk-php56-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.

# /opt/plesk/php/5.6/bin/pecl config-show
PHP Warning: PHP Startup: Unable to load dynamic library '/opt/plesk/php/5.6/lib/php/modules/memcached.so' - /opt/plesk/php/5.6/lib/php/modules/memcached.so: cannot open shared object file: No such file or directory in Unknown on line 0
Configuration (channel pecl.php.net):
=====================================
Auto-discover new Channels auto_discover <not set>
Default Channel default_channel pecl.php.net
HTTP Proxy Server Address http_proxy <not set>
PEAR server [DEPRECATED] master_server pear.php.net
Default Channel Mirror preferred_mirror pecl.php.net
Remote Configuration File remote_config <not set>
PEAR executables directory bin_dir /opt/plesk/php/5.6/bin
PEAR documentation directory doc_dir /opt/plesk/php/5.6/share/doc/pear
PHP extension directory ext_dir /opt/plesk/php/5.6/lib/php/modules
PEAR metadata directory metadata_dir /opt/plesk/php/5.6/var/lib/pear
PEAR directory php_dir /opt/plesk/php/5.6/share/pear
PEAR Installer cache directory cache_dir /opt/plesk/php/5.6/var/cache/php-pear
PEAR configuration file cfg_dir /opt/plesk/php/5.6/etc/pear
directory
PEAR data directory data_dir /opt/plesk/php/5.6/share/pear-data
PEAR Installer download download_dir /tmp/pear/download
directory
PHP CLI/CGI binary php_bin /opt/plesk/php/5.6/bin
php.ini location php_ini <not set>
--program-prefix passed to php_prefix <not set>
PHP's ./configure
--program-suffix passed to php_suffix <not set>
PHP's ./configure
PEAR Installer temp directory temp_dir /tmp
PEAR test directory test_dir /opt/plesk/php/5.6/share/tests/pear
PEAR www files directory www_dir /opt/plesk/php/5.6/var/www/html
Cache TimeToLive cache_ttl 3600
Preferred Package State preferred_state stable
Unix file mask umask 22
Debug Log Level verbose 1
PEAR password (for password <not set>
maintainers)
Signature Handling Program sig_bin /usr/bin/gpg
Signature Key Directory sig_keydir /opt/plesk/php/5.6/etc/pearkeys
Signature Key Id sig_keyid <not set>
Package Signature Type sig_type gpg
PEAR username (for username <not set>
maintainers)
User Configuration File Filename /root/.pearrc
System Configuration File Filename /opt/plesk/php/5.6/etc/pear.conf
 
Hello UFHH01

And the others command /opt/plesk/php/5.6/bin/pecl config-set php_bin /opt/plesk/php/5.6/bin

# /opt/plesk/php/5.6/bin/pecl config-set php_bin /opt/plesk/php/5.6/bin
PHP Warning: PHP Startup: Unable to load dynamic library '/opt/plesk/php/5.6/lib/php/modules/memcached.so' - /opt/plesk/php/5.6/lib/php/modules/memcached.so: cannot open shared object file: No such file or directory in Unknown on line 0
config-set succeeded
 
Hi cookkoo,

You can see:
php.ini location php_ini <not set>
--program-prefix passed to php_prefix <not set>
PHP's ./configure
... which I already answered with the suggestion:

For Plesk PHP version 5.6 :
/opt/plesk/php/5.6/bin/pecl config-set php_bin /opt/plesk/php/5.6/bin
and
/opt/plesk/php/5.6/bin/pecl config-set php_ini /opt/plesk/php/5.6/etc/php.ini

Afterwards, please retry your previous PECL installation and report again possible issues:

/opt/plesk/php/5.6/bin/pecl install memcached
 
Hello UFHH01

The results as below:

# /opt/plesk/php/5.6/bin/pecl config-set php_bin /opt/plesk/php/5.6/bin
PHP Warning: PHP Startup: Unable to load dynamic library '/opt/plesk/php/5.6/lib/php/modules/memcached.so' - /opt/plesk/php/5.6/lib/php/modules/memcached.so: cannot open shared object file: No such file or directory in Unknown on line 0
config-set succeeded

# /opt/plesk/php/5.6/bin/pecl install memcached
PHP Warning: PHP Startup: Unable to load dynamic library '/opt/plesk/php/5.6/lib/php/modules/memcached.so' - /opt/plesk/php/5.6/lib/php/modules/memcached.so: cannot open shared object file: No such file or directory in Unknown on line 0
downloading memcached-2.2.0.tgz ...
Starting to download memcached-2.2.0.tgz (70,449 bytes)
.................done: 70,449 bytes
15 source files, building
WARNING: php_bin /opt/plesk/php/5.6/bin appears to have a suffix /5.6/bin, but config variable php_suffix does not match
running: phpize
Configuring for:
PHP Api Version: 20131106
Zend Module Api No: 20131226
Zend Extension Api No: 220131226
libmemcached directory [no] :
 
...... and now please CONTINUE as suggested in the article:

(when prompted for the libmemcached directory, leave it blank and hit the Enter key)

And register it with Plesk:

# echo "extension=memcached.so" > /opt/plesk/php/5.6/etc/php.d/memcached.ini

# plesk bin php_handler --reread
 
Hello UFHH01

The results as below:

/opt/plesk/php/5.6/bin/pecl config-set php_bin /opt/plesk/php/5.6/bin
PHP Warning: PHP Startup: Unable to load dynamic library '/opt/plesk/php/5.6/lib/php/modules/memcached.so' - /opt/plesk/php/5.6/lib/php/modules/memcached.so: cannot open shared object file: No such file or directory in Unknown on line 0
config-set succeeded

# /opt/plesk/php/5.6/bin/pecl config-set php_ini /opt/plesk/php/5.6/etc/php.ini
PHP Warning: PHP Startup: Unable to load dynamic library '/opt/plesk/php/5.6/lib/php/modules/memcached.so' - /opt/plesk/php/5.6/lib/php/modules/memcached.so: cannot open shared object file: No such file or directory in Unknown on line 0
config-set succeeded

# /opt/plesk/php/5.6/bin/pecl install memcached
PHP Warning: PHP Startup: Unable to load dynamic library '/opt/plesk/php/5.6/lib/php/modules/memcached.so' - /opt/plesk/php/5.6/lib/php/modules/memcached.so: cannot open shared object file: No such file or directory in Unknown on line 0
downloading memcached-2.2.0.tgz ...
Starting to download memcached-2.2.0.tgz (70,449 bytes)
.................done: 70,449 bytes
15 source files, building
WARNING: php_bin /opt/plesk/php/5.6/bin appears to have a suffix /5.6/bin, but config variable php_suffix does not match
running: phpize
Configuring for:
PHP Api Version: 20131106
Zend Module Api No: 20131226
Zend Extension Api No: 220131226
libmemcached directory [no] :
building in /tmp/pear-build-rootayHGDK/memcached-2.2.0
running: /tmp/memcached/configure --with-libmemcached-dir=no
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /opt/plesk/php/5.6
checking for PHP includes... -I/opt/plesk/php/5.6/include/php -I/opt/plesk/php/5.6/include/php/main -I/opt/plesk/php/5.6/include/php/TSRM -I/opt/plesk/php/5.6/include/php/Zend -I/opt/plesk/php/5.6/include/php/ext -I/opt/plesk/php/5.6/include/php/ext/date/lib
checking for PHP extension directory... /opt/plesk/php/5.6/lib/php/modules
checking for PHP installed headers prefix... /opt/plesk/php/5.6/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 0.13.5 (ok)
checking for gawk... gawk
checking whether to enable memcached support... yes, shared
checking for libmemcached... yes, shared
checking whether to enable memcached session handler support... yes
checking whether to enable memcached igbinary serializer support... no
checking whether to enable memcached json serializer support... no
checking whether to enable memcached msgpack serializer support... no
checking whether to enable memcached sasl support... yes
checking whether to enable memcached protocol support... no
checking for ZLIB... yes, shared
checking for pkg-config... no
pkg-config not found
configure: error: Please reinstall the pkg-config distribution
ERROR: `/tmp/memcached/configure --with-libmemcached-dir=no' failed

# echo "extension=memcached.so" > /opt/plesk/php/5.6/etc/php.d/memcached.ini

# plesk bin php_handler --reread
The information about PHP handlers was successfully updated.
 
Hi cookkoo,

configure: error: Please reinstall the pkg-config distribution

For this error you might use:

aptitude reinstall pkg-config

... and again continue afterwards with your PECL installation:

/opt/plesk/php/5.6/bin/pecl install memcached
 
Hello UFHH01

This is the results.

# aptitude reinstall pkg-config
pkg-config is not currently installed, so it will not be reinstalled.
pkg-config is not currently installed, so it will not be reinstalled.
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.

# /opt/plesk/php/5.6/bin/pecl install memcached
PHP Warning: PHP Startup: Unable to load dynamic library '/opt/plesk/php/5.6/lib/php/modules/memcached.so' - /opt/plesk/php/5.6/lib/php/modules/memcached.so: cannot open shared object file: No such file or directory in Unknown on line 0
parsePackageName(): invalid package name "memcached" in "memcached"
invalid package name/package file "memcached"
install failed
 
pkg-config is not currently installed, so it will not be reinstalled.

Could you explain, why you continue with the PECL installation, even that you see, that "pkg-config" os not installed yet? Sorry, but you really have to read the output from your command line, if you would like to solve the issue!


In case that you see a message like this "PACKAGENAME is not currently installed, so it will not be reinstalled", it states, that you have to INSTALL the version, because it isn't yet installed.

Please use

apt-get install pkg-config

... and again continue afterwards with your PECL installation:

/opt/plesk/php/5.6/bin/pecl install memcached
 
Hello UFHH01,

Now my issue got FIX. And work very fine, I am not a programmer and so silly :)
But from a BIG help of you, my site can go ahead. I need to say THANK YOU AND THANK YOU AGAIN.
If i got some money from my site, i will take you to travelling around the world :)

Best Regards,
 
Why would any sane sysadmin want to run memcache in the default, single instance model, on a shared server? Unless things dramatically recently, memcache provides no authentication or other types of privilege separation which means users can easily read (or worse, write) other users keys.
 
Hello burnley, I thought Performance + Security should go together. from your information above, Please suggestion for How to protect that security issue ?
 
The only possible way to avoid the security issue is to run per-vhost memcached instances, which afaict isn't something Plesk configures out of the box.
 
Hi guys,

Trying to install memcached as on the blog, but I get this for both 5.6 and 7.0:

Code:
yum install plesk-php70-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * atomic: www4.atomicorp.com
 * base: centos.mirrors.ovh.net
 * centosplus: centos.mirrors.ovh.net
 * epel: www.mirrorservice.org
 * extras: centos.mirrors.ovh.net
 * updates: centos.mirrors.ovh.net
Resolving Dependencies
--> Running transaction check
---> Package plesk-php70-devel.x86_64 0:7.0.9-centos7.16072211 will be installed
--> Processing Dependency: plesk-php70 = 7.0.9-centos7.16072211 for package: plesk-php70-devel-7.0.9-centos7.16072211.x86_64
--> Finished Dependency Resolution
Error: Package: plesk-php70-devel-7.0.9-centos7.16072211.x86_64 (plesk-php-7.0)
           Requires: plesk-php70 = 7.0.9-centos7.16072211
           Installed: plesk-php70-7.0.10-centos7.16090813.x86_64 (@PHP_7_0-dist)
               plesk-php70 = 7.0.10-centos7.16090813
           Available: plesk-php70-7.0.9-centos7.16072211.x86_64 (plesk-php-7.0)
               plesk-php70 = 7.0.9-centos7.16072211
 You could try using --skip-broken to work around the problem
** Found 3 pre-existing rpmdb problem(s), 'yum check' output follows:
plesk-management-node-12.5.30-cos7.build1205150826.19.x86_64 has missing requires of psa-vhost >= ('0', '12.5.30', None)
plesk-service-node-utilities-12.5.30-cos7.build1205150826.19.x86_64 has missing requires of psa-logrotate
plesk-web-hosting-12.5.30-cos7.build1205150826.19.x86_64 has missing requires of psa-vhost >= ('0', '12.5.30', None)


yum install plesk-php56-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * atomic: www4.atomicorp.com
 * base: centos.mirrors.ovh.net
 * centosplus: centos.mirrors.ovh.net
 * epel: epel.mirrors.ovh.net
 * extras: centos.mirrors.ovh.net
 * updates: centos.mirrors.ovh.net
Resolving Dependencies
--> Running transaction check
---> Package plesk-php56-devel.x86_64 0:5.6.24-centos7.16072212 will be installed
--> Processing Dependency: plesk-php56 = 5.6.24-centos7.16072212 for package: plesk-php56-devel-5.6.24-centos7.16072212.x86_64
--> Finished Dependency Resolution
Error: Package: plesk-php56-devel-5.6.24-centos7.16072212.x86_64 (plesk-php-5.6)
           Requires: plesk-php56 = 5.6.24-centos7.16072212
           Installed: plesk-php56-5.6.25-centos7.16090812.x86_64 (@PHP_5_6-dist)
               plesk-php56 = 5.6.25-centos7.16090812
           Available: plesk-php56-5.6.24-centos7.16072212.x86_64 (plesk-php-5.6)
               plesk-php56 = 5.6.24-centos7.16072212
 You could try using --skip-broken to work around the problem
** Found 3 pre-existing rpmdb problem(s), 'yum check' output follows:
plesk-management-node-12.5.30-cos7.build1205150826.19.x86_64 has missing requires of psa-vhost >= ('0', '12.5.30', None)
plesk-service-node-utilities-12.5.30-cos7.build1205150826.19.x86_64 has missing requires of psa-logrotate
plesk-web-hosting-12.5.30-cos7.build1205150826.19.x86_64 has missing requires of psa-vhost >= ('0', '12.5.30', None)


Any clue how to overcome this please?
 
Hi octet,

Installed: plesk-php70-7.0.10-centos7.16090813.x86_64 (@PHP_7_0-dist)
Installed: plesk-php56-5.6.25-centos7.16090812.x86_64 (@PHP_5_6-dist)

Available: plesk-php70-7.0.9-centos7.16072211.x86_64 (plesk-php-7.0)
Available: plesk-php56-5.6.24-centos7.16072212.x86_64 (plesk-php-5.6)

As you can see, your repos are missing the actual "plesk-phpXX-devel" - packages, depending to your installed PHP - version. Pls. see as resolution: => #26
 
Back
Top