• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

Resolved Can not see Memcached and Varnish in Websites & Domains > PHP Settings

lepe

Basic Pleskian
Hello

I have installed and running Memcached and Varnish in Centos 7.3 but I cant choose and check it in Websites & Domains > PHP Settings

Memcached loaded (/usr/lib/systemd/system/memcached.service; enabled
Active: active (running)


varnish.service - Varnish Cache, a high-performance HTTP accelerator
Loaded: loaded (/usr/lib/systemd/system/varnish.service; enabled
Active: active (running)


I believe that is neccessary have installed Memcached and Varnish in route /opt/plesk/php/7.1/etc/php.d/ but only can see memcached in /etc/sysconfig/memcached and varnish in /etc/varnish/

I believe it don was installed in correct routes because I installed php7, php5.6 and php 5.3 from plesk panel
I tried add in various files "extension=memcached.so" unsucessfully

Do you can help please?

best regards
 
Hi lepe,

you make the mistake to mix the packages with PHP - extensions ( modules ).

To inform yourself "How to install additional PHP modules", pls. consider to read the Plesk blog - article at:


... and if you need further informations, pls. consider to use FORUM SEARCH, as for example:


.. because your corresponding issues/errors/problems and questions have been discussed quite a few time now here in forum. ;)



If you still need further help, pls. make sure to include ( possible ) errors from your logs, or from your command line and describe as well the exact steps that you used to install the PHP modules, so that people willing to help you have something to start with their investigations. ;)
 
Hello

I am sorry but I dont install php from ssh and i see posts (specially this) where you say should be add these lines:
# echo "extension=memcached.so" > /opt/plesk/php/5.6/etc/php.d/memcached.ini
# plesk bin php_handler --reread

the issue is that I dont have file memcached.ini in /opt/plesk/php/7.1/etc/php.d/

I resume my installations (I started working with ssh 1 week ago):

1) A new install of Centos 7, mc installed and full yum -y update
2) This Centos 7 already included php version and memcached
3) In Plesk 12 I updated from Tools-Settings > Updates choosing PHP 7.1, PHP 5.6 and PHP 5.3
4) I updated Plesk 12 to last Plesk Onix from Tools-Settings > Updates

NOTE: I see file memcache.ini and z-memcached.ini in etc/php.d and memcached without extension in etc/sysconfig and /usr/bin plus memcached-tool
NOTE 2: I see memcached.service, plesk-php56-fpm.service, plesk-php71-fpm.service in usr/lib/systemd/system but I dont see plesk-php53-fpm.service that I have also in /opt/plesk/php/5.3

I believe that have php versions duplicates installed in various routes, first route from Centos 7 install and Yum full update and others php versions installed from plesk backoffice because I have my website very unstable (One times in gtmetrix load in 2.7sec and anothers times load in 4.8sec)

Now I have installed Apache 2.4.6, Centos 7.3, Plesk Onix 17 beta, mariadb 5.5, Server MPM event (maybe mpm code added can be too my issue of unsteadiness)

A help for a newbiew
best regards
 
Sorry for this repply, I write in ssh php --version and system says "PHP 5.4.45 " when I cant see this version in /opt/plesk/php/ and I dont know where is installed
 
Hi lepe,

again, you are mixing things... your VENDOR PHP version is not located at any Plesk - related PHP - paths. On CentOS 7 for example, your paths of your serverwide PHP - version would be:

Code:
/etc/php.ini
/etc/php.d
/etc/php-fpm.d

... and never something that starts with "/opt/plesk/php". ;)

the issue is that I dont have file memcached.ini in /opt/plesk/php/7.1/etc/php.d/
The example "echo" - command will not only place the desired location "extension=memcached.so" into your *.ini file, it will create it, if not already existent. ;)

But again, if you missed to install the desired PHP module for a Plesk - PHP - version, as described at the blog - article ( step-by-step! ), there is no need to perform such an "echo" - command.


I believe that have php versions duplicates installed in various routes, first route from Centos 7 install and Yum full update and others php versions installed from plesk backoffice because I have my website very unstable (One times in gtmetrix load in 2.7sec and anothers times load in 4.8sec)

Now I have installed Apache 2.4.6, Centos 7.3, Plesk Onix 17 beta, mariadb 5.5, Server MPM event (maybe mpm code added can be too my issue of unsteadiness)
Apache MPM - EVENT doesn't work well with PHP-FPM. You should consider to use "MPM-PREFORK" instead, to avoid issues, errors and problems! ;)

If you already "believe" ( which is not really a decent investigation ), that you installed dublicate PHP - versions, pls. consider to DE-install all dublicates.


By the way... Plesk Onyx 17.5.3 is not any BETA anymore... it's a stable ( latest ) release. ;)
 
Hi lepe,

again, you are mixing things... your VENDOR PHP version is not located at any Plesk - related PHP - paths. On CentOS 7 for example, your paths of your serverwide PHP - version would be:

Code:
/etc/php.ini
/etc/php.d
/etc/php-fpm.d

... and never something that starts with "/opt/plesk/php". ;)

Ok If I understand it and according to my server files:
1) My PHP version by centos vendor is 5.4.45 located in etc/php.d and etc/php-fpm.d
2) I have additionally added "plesk extras php modules 5.3, 5.6, 7.1.4" installed in routes /opt/plesk/php

The example "echo" - command will not only place the desired location "extension=memcached.so" into your *.ini file, it will create it, if not already existent. ;)

But again, if you missed to install the desired PHP module for a Plesk - PHP - version, as described at the blog - article ( step-by-step! ), there is no need to perform such an "echo" - command.

I write these codes but yet I can´t see in Tools-Settings > PHP Settings > 7.1.4 FasctCGI Application

[root@localhost ~]# echo "extension=memcached.so" > /opt/plesk/php/7.1/etc/php.d/memcached.ini
[root@localhost ~]# plesk bin php_handler --reread
The information about PHP handlers was successfully updated.
[root@localhost ~]# service httpd restart
Redirecting to /bin/systemctl restart httpd.service
[root@localhost ~]#


NOTE: Now I see memcached option and checked in PHP 5.4.45 by vendor but I cant see in 7.1.4 FasctCGI Application for choose it, i want memcached for choose in my php 7.1.4 installed from extra package of plesk

Best regards
 

Attachments

  • plesk.jpg
    plesk.jpg
    97.8 KB · Views: 3
Last edited:
I am sorry but with these comands I dont know where is located:
[root@localhost ~]# locate memcached | grep ini
-bash: locate: command not found
[root@localhost ~]# mlocate memcached | grep ini
-bash: mlocate: command not found
I will check how can install "mlocate" module, at the moment the only route that I know was:
Memcached loaded (/usr/lib/systemd/system/memcached.service; enabled
Active: active (running)



In this moment according your suggestion I change to MPM prefork and I check load modules, it says "socache_memcache_module (shared)" and "php5_module (shared)" is loaded but not PHP7, also I want load socache_memcached_module in php7

Code:
[root@localhost ~]# httpd -M
[Fri May 12 17:50:32.554048 2017] [so:warn] [pid 17392] AH01574: module actions_module is already loaded, skipping
[Fri May 12 17:50:32.554731 2017] [so:warn] [pid 17392] AH01574: module auth_digest_module is already loaded, skipping
[Fri May 12 17:50:32.556791 2017] [so:warn] [pid 17392] AH01574: module authz_user_module is already loaded, skipping
[Fri May 12 17:50:32.560165 2017] [so:warn] [pid 17392] AH01574: module headers_ module is already loaded, skipping
[Fri May 12 17:50:32.561623 2017] [so:warn] [pid 17392] AH01574: module logio_module is already loaded, skipping
[Fri May 12 17:50:32.564965 2017] [so:warn] [pid 17392] AH01574: module suexec_module is already loaded, skipping
[Fri May 12 17:50:32.566107 2017] [so:warn] [pid 17392] AH01574: module dav_module is already loaded, skipping
[Fri May 12 17:50:32.566165 2017] [so:warn] [pid 17392] AH01574: module dav_fs_module is already loaded, skipping
Loaded Modules:
 core_module (static)
 so_module (static)
 http_module (static)
 actions_module (shared)
 suexec_module (shared)
 dav_module (shared)
 dav_fs_module (shared)
 auth_digest_module (shared)
 authz_user_module (shared)
 logio_module (shared)
 headers_module (shared)
 access_compat_module (shared)
 alias_module (shared)
 allowmethods_module (shared)
 auth_basic_module (shared)
 authn_anon_module (shared)
 authn_core_module (shared)
 authn_dbd_module (shared)
 authn_dbm_module (shared)
 authn_file_module (shared)
 authn_socache_module (shared)
 authz_core_module (shared)
 authz_dbd_module (shared)
 authz_dbm_module (shared)
 authz_groupfile_module (shared)
 authz_host_module (shared)
 authz_owner_module (shared)
 autoindex_module (shared)
 cache_module (shared)
 cache_disk_module (shared)
 data_module (shared)
 dbd_module (shared)
 deflate_module (shared)
 dir_module (shared)
 dumpio_module (shared)
 echo_module (shared)
 env_module (shared)
 expires_module (shared)
 ext_filter_module (shared)
 filter_module (shared)
 include_module (shared)
 info_module (shared)
 log_config_module (shared)
 mime_magic_module (shared)
 mime_module (shared)
 negotiation_module (shared)
 remoteip_module (shared)
 reqtimeout_module (shared)
 rewrite_module (shared)
 setenvif_module (shared)
 slotmem_plain_module (shared)
 slotmem_shm_module (shared)
 socache_dbm_module (shared)
 socache_memcache_module (shared)
 socache_shmcb_module (shared)
 status_module (shared)
 substitute_module (shared)
 unique_id_module (shared)
 unixd_module (shared)
 userdir_module (shared)
 version_module (shared)
 vhost_alias_module (shared)
 dav_lock_module (shared)
 lua_module (shared)
 mpm_prefork_module (shared)
 proxy_module (shared)
 lbmethod_bybusyness_module (shared)
 lbmethod_byrequests_module (shared)
 lbmethod_bytraffic_module (shared)
 lbmethod_heartbeat_module (shared)
 proxy_ajp_module (shared)
 proxy_balancer_module (shared)
 proxy_connect_module (shared)
 proxy_express_module (shared)
 proxy_fcgi_module (shared)
 proxy_fdpass_module (shared)
 proxy_ftp_module (shared)
 proxy_http_module (shared)
 proxy_scgi_module (shared)
 proxy_wstunnel_module (shared)
 ssl_module (shared)
 systemd_module (shared)
 cgi_module (shared)
 perl_module (shared)
 php5_module (shared)
 aclr_module (shared)
 bw_module (shared)
 fcgid_module (shared)
 jk_module (shared)
 security2_module (shared)
 
Hi lepe,

the Plesk - PHP - versions don't include a "libapache2-mod-php" module. If you desire to add a PHP 7.X "libapache2-mod-php", so have to install and additional PHP version, or you need to upgrade your vendor PHP - version. ;)
 
Hi lepe,

the Plesk - PHP - versions don't include a "libapache2-mod-php" module. If you desire to add a PHP 7.X "libapache2-mod-php", so have to install and additional PHP version, or you need to upgrade your vendor PHP - version. ;)
Hi

Thank you very much for your suggest. I update PHP version enabling from remi-repo php7 and php 7.1 for that it install libapache2-mod-php and now all is installed but yet I cant see Memcached for check it in Plesk > Tools-Settings > PHP Settings > 7.1.4 FasctCGI Application

Very errors with update:
Code:
warning: /etc/php.ini created as /etc/php.ini.rpmnew
  Updating   : php-pecl-igbinary-2.0.4-1.el7.remi.7.1.x86_64               3/37
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/bz2.so' - /usr/lib64/php/modules/bz2.so: undefined symbol: zend_fetch_resource2_ex in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/calendar.so' - /usr/lib64/php/modules/calendar.so: undefined symbol: _emalloc_32 in Unknown on line 0
PHP Warning:  PHP Startup: ctype: Unable to initialize module
Module compiled with module API=20160303
PHP    compiled with module API=20100525
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/curl.so' - /usr/lib64/php/modules/curl.so: undefined symbol: zend_list_close in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/exif.so' - /usr/lib64/php/modules/exif.so: undefined symbol: zend_hash_str_exists in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/fileinfo.so' - /usr/lib64/php/modules/fileinfo.so: undefined symbol: zend_list_close in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/ftp.so' - /usr/lib64/php/modules/ftp.so: undefined symbol: zend_fetch_resource2 in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/gettext.so' - /usr/lib64/php/modules/gettext.so: undefined symbol: zend_parse_arg_str_slow in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/iconv.so' - /usr/lib64/php/modules/iconv.so: undefined symbol: _zval_get_string_func in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/json.so' - /usr/lib64/php/modules/json.so: undefined symbol: _emalloc_56 in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/mysqlnd.so' - /usr/lib64/php/modules/mysqlnd.so: undefined symbol: zend_hash_str_del in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/pdo.so' - /usr/lib64/php/modules/pdo.so: undefined symbol: zend_ce_exception in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/phar.so' - /usr/lib64/php/modules/phar.so: undefined symbol: zend_sort in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/sockets.so' - /usr/lib64/php/modules/sockets.so: undefined symbol: zend_hash_str_del in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/tokenizer.so' - /usr/lib64/php/modules/tokenizer.so: undefined symbol: zend_ast_destroy in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/mysqli.so' - /usr/lib64/php/modules/mysqli.so: undefined symbol: mysqlnd_global_stats in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/pdo_mysql.so' - /usr/lib64/php/modules/pdo_mysql.so: undefined symbol: mysqlnd_allocator in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/pdo_sqlite.so' - /usr/lib64/php/modules/pdo_sqlite.so: undefined symbol: php_pdo_unregister_driver in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/igbinary.so' - /usr/lib64/php/modules/igbinary.so: undefined symbol: _emalloc_56 in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/msgpack.so' - /usr/lib64/php/modules/msgpack.so: undefined symbol: _efree_56 in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/curl.so' - /usr/lib64/php/modules/curl.so: undefined symbol: zend_list_close in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/igbinary.so' - /usr/lib64/php/modules/igbinary.so: undefined symbol: _emalloc_56 in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/msgpack.so' - /usr/lib64/php/modules/msgpack.so: undefined symbol: _efree_56 in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/pdo.so' - /usr/lib64/php/modules/pdo.so: undefined symbol: zend_ce_exception in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/pdo_mysql.so' - /usr/lib64/php/modules/pdo_mysql.so: undefined symbol: mysqlnd_allocator in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/phar.so' - /usr/lib64/php/modules/phar.so: undefined symbol: zend_sort in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/sqlite3.so' - /usr/lib64/php/modules/sqlite3.so: undefined symbol: zend_ce_exception in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/memcached.so' - /usr/lib64/php/modules/memcached.so: undefined symbol: php_json_decode_ex in Unknown on line 0
  Updating   : php-cli-7.1.5-1.el7.remi.x86_64                             7/37
  Installing : libwebp-0.3.0-3.el7.x86_64                                  8/37
  Installing : gd-last-2.2.4-1.el7.remi.x86_64                             9/37
  Installing : fastlz-0.1.0-0.1.20070619svnrev12.el7.remi.x86_64          10/37
  Updating   : php-pecl-memcached-3.0.3-1.el7.remi.7.1.x86_64             11/37
Failed loading /usr/lib64/php/modules/ioncube_loader_lin_5.4.so:  /usr/lib64/php/modules/ioncube_loader_lin_5.4.so: undefined symbol: execute
PHP Warning:  Module 'curl' already loaded in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/dom.so' - /usr/lib64/php/modules/dom.so: undefined symbol: zval_used_for_init in Unknown on line 0
PHP Warning:  Module 'fileinfo' already loaded in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/gd.so' - /usr/lib64/php/modules/gd.so: undefined symbol: _zend_list_find in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/gmp.so' - /usr/lib64/php/modules/gmp.so: undefined symbol: _zend_list_delete in Unknown on line 0
PHP Warning:  Module 'igbinary' already loaded in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/imap.so' - /usr/lib64/php/modules/imap.so: undefined symbol: _zend_list_delete in Unknown on line 0
PHP Warning:  Module 'json' already loaded in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/mbstring.so' - /usr/lib64/php/modules/mbstring.so: undefined symbol: zend_hash_del_key_or_index in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/mcrypt.so' - /usr/lib64/php/modules/mcrypt.so: undefined symbol: _zend_list_delete in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/memcache.so' - /usr/lib64/php/modules/memcache.so: undefined symbol: _zend_list_find in Unknown on line 0
PHP Warning:  Module 'msgpack' already loaded in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/mysql.so' - /usr/lib64/php/modules/mysql.so: undefined symbol: _zend_list_find in Unknown on line 0
PHP Warning:  Module 'mysqli' already loaded in Unknown on line 0
PHP Warning:  Module 'PDO' already loaded in Unknown on line 0
PHP Warning:  Module 'pdo_mysql' already loaded in Unknown on line 0
PHP Warning:  Module 'pdo_sqlite' already loaded in Unknown on line 0
PHP Warning:  Module 'Phar' already loaded in Unknown on line 0
PHP Warning:  PHP Startup: posix: Unable to initialize module
Module compiled with module API=20100525
PHP    compiled with module API=20160303
 
[root@localhost ~]# php --version
PHP 7.1.5 (cli) (built: May 9 2017 18:30:17) ( NTS )

OK, now I have PHP 7.1.5 with memcached enabled.

How?

I choose PHP 5.4.45 by vendor but it is PHP 7.1.5
 
Last edited:
Hi lepe,

you forgot to "REREAD" after you had to add an additional PHP - Handler for Plesk, otherwise your new PHP - Handler will never be displayed at all over the Plesk Control Panel. Pls. read the official Plesk documentation at:


... to inform yourself about the possible command options for the "php_handler" CLI - commands. ;)
 
Hi lepe,

you forgot to "REREAD" after you had to add an additional PHP - Handler for Plesk, otherwise your new PHP - Handler will never be displayed at all over the Plesk Control Panel. Pls. read the official Plesk documentation at:


... to inform yourself about the possible command options for the "php_handler" CLI - commands. ;)
I just update my post. I made plesk bin php_handler --reread and service httpd restart. The issue is that I dont see in plesk PHP 7.1.5 but if I change for domain for PHP 5.4.45 it is like PHP 7.1.5 with memcached enabled :)
Any suggestion for enable varnish adding some "echo" for php 7.1.5 ?

best regards
 
the issue was libapache2-mod-php, thank you very much for your help

And you know say me a ssh code to can show varnish in plesk ? Or this module if is running it means that it is already running on all the websites?

best regards
 

Attachments

  • php.jpg
    php.jpg
    55.5 KB · Views: 5
Hi lepe,

could you pls. explain, WHAT do you want to see WHERE, when you state:
And you know say me a ssh code to can show varnish in plesk ?


Or this module if is running it means that it is already running on all the websites?
As stated before, varnish is NOT a PHP - module. You can't implement it as memcache for example.
Implementing varnish is not an easy administration task and you have to find a good tutorial in order to be able to use varnish together with nginx+apache on a server, controlled with the help of Plesk.

I suggest another option ( using ""docker" ), as described at the Plesk blog - article by @Viktor Vogel , if you desire to use varnish and wordpress ( for example ):

 
Back
Top