1

Today we enabled memcache on centos and every thing is ok. PhpMyAdmin also run well with memcache but when i tried to login with my application that developed by yii2 i got this error:

session_start(): Failed to initialize storage module: memcache (path: /tmp)

After this i tried to enable memcache in yii2 config file same as documentation.

Here is my configuration in backend\config\main.php

'cache' => [
        'class' => 'yii\caching\MemCache',
        'servers' => [
            [
                'host' => '127.0.0.1',
                'port' => 11211,
                'weight' => 60,
            ],
        ],
        'useMemcached' => true,

    ],

But after everything, problem not solved and i tired from searching web.

In no forum and in no site no body don't talk why i face to this problem.

Thanks for your help. This is so important because my admin page is crashed.

Aminkt
  • 612
  • 9
  • 25
  • Possible duplicate of [session\_start(): Failed to initialize storage module: memcache (path: /var/lib/php5) in /usr/share/phpmyadmin/libraries/session.inc.php on line 81](http://stackoverflow.com/questions/21387375/session-start-failed-to-initialize-storage-module-memcache-path-var-lib-p) – Dekel Oct 08 '16 at 17:05
  • I dont think. Framework handle the session not me and this problem happen just when memcache enabled. – Aminkt Oct 08 '16 at 17:23

1 Answers1

1

I found my answer.

Just need edit your session configuration in yii application configuration from default to cache type

Aminkt
  • 612
  • 9
  • 25