Strange error when using login form

Hi all -

Using Kirby 2.5.12 and when I log in via the frontend using a login form, I get the following:

Whoops\Exception\ErrorException thrown with message “Unknown: using touch command with binary protocol is not recommended with libmemcached versions below 1.0.18, please use ascii protocol or upgrade libmemcached”

If I refresh the error goes away and the page works fine with me logged in. Any ideas what could be causing this?


Well… I’m guessing, as the error suggests, that libmemcached is to low version. Are you using caching on the site? does the error persist if you disable caching? is your php etc up to date. (version 7.1+)

1 Like

Thanks so much! I didn’t even consider turning on cache (set to false when in dev mode). Apologies for such a stupid oversight!

Just to jump back on this, even with cache on Im still getting this error throughout the panel:

“Unknown: using touch command with binary protocol is not recommended with libmemcached versions below 1.0.18, please use ascii protocol or upgrade libmemcached”

I’m not too clued up on server tech, but I’m using php version 7.1 and run all my other kirby installs on the same server without this issue, so am a bit confused. Any help would be appreciated!

It’s a hosting issue really. I would get on to your hosts support and have them upgrade libmemcached to above version 1.0.18. What kind of hosting is it? If its a VPS or something like that, then make sure it’s all up to date with security patches etc and give it a reboot.

You may not have hit the issue on other sites because you are not using caching on them, or somethings not triggering the caching to do its thing on those sites.

This is a long shot but i did read a post on another website on this issue - memcached doesnt like running out of a folder named admin - it will throw this error. Odd but true. I don’t suppose you are running a custom folder structure on this site and you’ve named a folder admin?

Thanks James. No admin folder being used, but it is VPS. Out of curiosity, is there another hosting platform you’d recommend? Also, is 1.0.18 now quite old? I’m struggling to find what would be the current version.

Actually from what I can see, 1.0.18 is the latest version?

To further bombarde you, when using the panel, i get this error in the console:

Uncaught SyntaxError: Unexpected token

Warning: session_start(): Unable to clear session lock record in /var/sites/e/ on line 64

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /var/sites/e/ in /var/sites/e/ on line 64

Warning: Cannot modify header information - headers already sent by (output started at /var/sites/e/ in /var/sites/e/ on line 251

Hrmmm… thats a new one on me.

As far as hosting goes, i’m running a few Kirby sites on a CentOS based Krystal Hosting cloud VPS. You can pick which flavour of linux you want. Very good, excellent support. Never had any problems at all.

I also have one other site on a Fortrabbit package… also very good. The cheapeast package is more then ample for a single kirby site.

This new one looks rather like the session cannot be saved properly.

But you say that you have various Kirby installs running on the server without any issues. So I’d like to know if they are different Kirby versions, in what way they differ (use of plugins etc.).

Have you tried to install a fresh Starterkit?

Thanks for the reply. This install that isn’t working is only using the ‘select a structure’ plugin.

I have another install with only this plugin too which works fine.

And I have a couple of others with other plugins, and one with none that work fine too. I can install a fresh starterkit and let you know if that’s fine yes… will get on it now.

And then it would help if you compare the PHP settings on your virtual hosts using phpinfo()to see if there are any differences; e.g. if memcached is also enabled in these other settings etc.

Good idea, thanks. Do you know if there is a tool out there to compare phpinfo output? If not, there should be!

Not of the top of my head, but Excel will happily open an HTML file and pick up the html table elements as spreadsheet cells. Atleast that way you can save the page from the browser and drop them in side by side and read across.

A quick google search revealed this

Don’t know if it works

And this one:, which is likely easier to use.

Okay… thanks for your help so far. After some digging on the weekend, this is what I have so far…

Creating another fresh instance of starterkit with the same php 7.1 VPS hosting created no issues. I did a php info comparison and all the same. I pulled apart the install with issues and found that the issue is now only happening with the a structured field using the ‘select a structure’ plugin. With PHP v7.1 it happens whenever you edit anything on it, but with PHP v7.0 it only happens when you try to save a new entry. I’ve included a video of me trying to edit it with 7.1 here. You’ll also notice how the top header bar goes a bit weird, which baffles me. The only way I can access the menu to log out is to force an overflow:visible property in the css.

So if I then assume the issue is that plugin, then I remember I have another site on the same server that is running it without issues; however this site is using php5.6. So if I change to 5.6 I get a php error in a customisation that was done for me by a regular on this forum.

Whoops\Exception\ErrorException thrown with message “syntax error, unexpected ‘?’”

#0 Whoops\Exception\ErrorException in /var/sites/e/


So at the moment changing the PHP version seems to affect things; I’m not sure how that affects libmemcache (when i talk to hosting support they just say they have the latest version installed which phpinfo confirms). The major issue is one version affects one thing and the other affects the other; Is there something simple in that code that can be changed to run on php 5.6? I’m in over my head here and really need to sort this, so any help is appreciated!

Yes, the null coalescing operatorin line only works in PHP 7. You can change it to make it compatible with 5.6 if you want.

return $colours[$field->value()]? $colours[$field->value()]:$field->value();

That’s worked! Thanks so much, you’ve saved my butt yet again! I’ve done some reading on null coalescing operators and lots to learn there! Thanks again.

Still wondering why that plugin causes issues with PHP 7.x, hm. I think I’ve used it with PHP 7+ without issues.

PHP 5.6 will reach end of life on December 31, 2018, so updating to PHP 7 is highly recommended.

Yes, I’m still assuming there are hosting issues, I just don’t have the time to get to the bottom of it yet! I’d be very interested to know what version of libmemcache you were running with it etc; I’m trying to work out if that error is a red herring or not!