• 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

Resolved Memcache install failed

Dukemaster

Regular Pleskian
Hi at all,
memcached for 7.1 I had successfully installed since few months.
Code:
root@server:~# /opt/plesk/php/7.1/bin/php -i | grep "memcached support"
=> memcached support => enabled
Now, i wanted to complete the feature by installing also memcache.
I followed the same good plesk tutorial for memcache+memcached installation like weeks ago (for memcached 7.0 + 7.1).
For command
Code:
/opt/plesk/php/5.6/bin/pecl install memcache
I changed 5.6 to 7.1
But I got the following error:
Code:
/tmp/memcache/memcache.c:40:40: fatal error: ext/standard/php_smart_str.h: No such file or directory
For sure I tried to find a solution here in PLESK forum, articles, support and on internet.
I found several answers, but they won't really say how to fix the problem, especially not with Plesk, some are for redis.
Does someone knows how and if it's possible to fix the installation? Please, remember that I use "only nginx" configuration without apache. I think that this time this is not important, but to be sure.

Additional question:
The configuration of Woltlab software says (visible in the screen):

Memcached.jpg

You can specify a weight factor to allow load balancing, for example “localhost:11211:67” or “10.0.13.37:31337:33”. Enter one server per line.


I don't really know if this configuration is always the same, especially the weight factor. How to get the correct values, nor where to change, if it's necessary? Or if it's possible to take exactly the first one for example.

Lots of greets.
 
Last edited:
Would be great if someone could give me a little help or inspiration.
I have installed memcached in PHP FPM 7.0 and 7.1 but there seems missing something.
Is the error that I'm using only nginx without apache in domain settings? Perhaps the special nginx release with incredible pagespeed?
But I won't get on @UFHH01 nerves by asking again.
When I insert localhost:11211:67 in the box of Cached in Woltlab admininstration panel and apply
the side load seems slower. Think I perhaps have to configure something else in Plesk or memcached / PHP.ini.
In FPM and FastCGI PHP settings the box memcached is visible and checked (also Redis but with redis also nobody could tell me how to configure the docker container properly).
Memcached is also shown in my phpinfo.php of the domains:

Code:
memcached
memcached support    enabled
Version     3.0.0b1
libmemcached version     1.0.18
SASL support     no
Session support     yes
igbinary support     no
json support     no
msgpack support     no


BUT I realized something what makes me wondering. Each value in phpinfo of Local and Master is the same.
Only one is different. Don't know if it's normal, and if not how to fix it? But it has nothing to do with memcached.
......
max_execution_time 0 700
max_file_uploads 20 20
max_input_nesting_level 64 64
max_input_time 60 60
max_input_vars 1000 1000
memory_limit 512M 512M
.......


root@server:~# ls -la /usr/lib/x86_64-linux-gnu/libmemcached.so.11
lrwxrwxrwx 1 root root 22 Dec 12 2015 /usr/lib/x86_64-linux-gnu/libmemcached.so.11 -> libmemcached.so.11.0.0
root@server:~# dpkg -S /usr/lib/x86_64-linux-gnu/libmemcached.so.11
libmemcached11:amd64: /usr/lib/x86_64-linux-gnu/libmemcached.so.11
root@server:~# plesk bin php_handler --reread
The information about PHP handlers was successfully updated.
root@server:~# ps aux | grep memcache
root 16618 0.0 0.0 14224 940 pts/0 S+ 18:09 0:00 grep --color=auto memcache
root@server:~# netstat -tap | grep memcached
(*** no result ***)
root@server:~# ps aux | grep memcache
(*** no result ***) okay its memcache not memcached.
root 16634 0.0 0.0 14224 940 pts/0 S+ 18:11 0:00 grep --color=auto memcache
root@server:~# netstat -tap | grep memcached
root@server:~# netstat -ap | grep 11211


Greets.
 
Last edited:
Hi Dukemaster,

root@server:~# ps aux | grep memcache
root 16618 0.0 0.0 14224 940 pts/0 S+ 18:09 0:00 grep --color=auto memcache
root@server:~# netstat -tap | grep memcached
root@server:~# netstat -ap | grep 11211
Do you notice, that there is no memcached - server running?
Did you install it?
Did you start it?

You installed the PHP - modules, but pls. keep in mind, that this doesn't automatically install the memcached server. ;)
 
Hi @UFHH01 I have little problems.
memcache is not possible to install. Don't know if it's necessary.
Code:
esk/php/7.0/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/memcache/memcache.c  -fPIC -DPIC -o .libs/memcache.o
/tmp/memcache/memcache.c:40:40: fatal error: ext/standard/php_smart_str.h: No such file or directory
compilation terminated.
Makefile:193: recipe for target 'memcache.lo' failed
make: *** [memcache.lo] Error 1
ERROR: `make' failed


When I start the memcached version for PHP 7.0 and PHP 7.1 then it asks:
libmemcached directory [no] : Here I hit only return. (No Y or N)

Code:
root@server:~# /opt/plesk/php/7.1/bin/pecl install memcached
pecl/memcached can optionally use PHP extension "igbinary" (version >= 2.0)
pecl/memcached can optionally use PHP extension "msgpack" (version >= 2.0)
downloading memcached-3.0.3.tgz ...
Starting to download memcached-3.0.3.tgz (77,310 bytes)
..................done: 77,310 bytes
15 source files, building
running: phpize
Configuring for:
PHP Api Version:         20160303
Zend Module Api No:      20160303
Zend Extension Api No:   320160303
libmemcached directory [no] :
building in /tmp/pear-build-rootX***deleted for security***/memcached-3.0.3
running: /tmp/memcached/configure --with-php-config=/opt/plesk/php/7.1/bin/php-config --with-libmemcached-dir=no
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E

In the middle it says
Code:
----------------------------------------------------------------------
Libraries have been installed in:
   /tmp/pear-build-rootX***deleted for securty***/memcached-3.0.3/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the 'LD_RUN_PATH' environment variable
     during linking
   - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to '/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------

and this is the end information:
Code:
Build process completed successfully
Installing '/opt/plesk/php/7.1/lib/php/modules/memcached.so'
install ok: channel://pecl.php.net/memcached-3.0.3
configuration option "php_ini" is not set to php.ini location
You should add "extension=memcached.so" to php.ini
Illegal instruction (core dumped)
root@server:~# ^C

Hope it's okay. If so, I only have to insert extension=memcached.so in my php.ini under extensions, like I did with geoip..etc...
root@server:~# echo "extension=memcached.so" > /opt/plesk/php/7.1/etc/php.d/memcached.ini
root@server:~# echo "extension=memcached.so" > /opt/plesk/php/7.0/etc/php.d/memcached.ini
plesk bin php_handler --reread
How can I check if installation was successful? Same commands like I posted three postings before?

Greets and Thanks

Greets.
 
Last edited:
YESSSSSS Thanks again @UFHH01
/opt/plesk/php/7.0/bin/php -i | grep "memcached support"
memcached support => enabled
/opt/plesk/php/7.1/bin/php -i | grep "memcached support"
memcached support => enabled

Now would be one question. What is with the 3rd value to put in Woltlab configuration :67
or another number. How is this important?


Greets
 
Hi, @UFHH01 by logging in Woltlabs communitiy ACP I get

502 Bad Gateway
nginx


But Forum itself is free. It seems only problems by admin panel. Do you have an idea what to do now?
 
Hi Dukemaster,

pls. delete the ACP cache and the cached templates ( folder: compiled ) and pls. keep again in mind, that Woltlab products ARE not related to any Plesk product at all. You might get support for it at the forum


... from Plesk Community users, but not at Plesk - related forums! ;)

In addition, you should start to investigate issues with the help of your log - files, as the logs contain much more than a single error message. :)
 
Yes, I remembered, but it was too late. It had worked from alone. Perhaps a cronjob did it. BUT.
Sorry, again wrong place, I know. But on the other hand it doesn't refer directly to Woltlab, more to memcached alone.
I made my configuration and forum is slower. BUt I will open a new thread for it, like you adviced. And I also delete the caches now in forum.
Thanks
 
Back
Top