Pregunta

Need help configuring Magento2 to use memcached for session storage on Ubuntu 16.04 running PHP7.0.4 FPM with php7.0-memcached build from php-memcached-dev github. I wonder what went wrong this time. :D

From phpinfo:

memcached support enabled
Version 3.0.0b1

My env.php:

'session' =>
   array (
      'save' => 'memcached’,
      'save_path' => 'localhost:11211',
),

I always get this error when following Magento2 docs to configure Magento2 to use memcached in app/etc/env.php:

stderr: "NOTICE: PHP message: PHP Parse error:  syntax error, unexpected 'save_path' (T_STRING), expecting ')'

References:

¿Fue útil?

Solución

The problem is not memcached, but a small typo in your code:

'session' =>
   array (
      'save' => 'memcached ⇨’⇦,
      'save_path' => 'localhost:11211',
),

You used a single quote ' at the beginning of the memcached string and and an acute accent ´ at the end.

That's the reason for the PHP parse error.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a magento.stackexchange
scroll top