Use PHP memcache in yii2
<p>In <code>yii2</code> I need to use memcache plugin I've installed this also will be shown in phpinfo but I get the following error when running the project:</p>

<blockquote>
  <p>Invalid Configuration – yii\base\InvalidConfigException - MemCache requires PHP memcache extension to be loaded.</p>
</blockquote>

<p><a href="https://i.stack.imgur.com/rFauc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rFauc.png" alt="enter image description here"></a></p>

<p>Cache configuration</p>

<pre><code>'cache' =&gt; [ 
       'class' =&gt; 'yii\caching\MemCache', 
       'servers' =&gt; [ 
           [ 
               'host' =&gt; '127.0.0.1', 
               'port' =&gt; 11211, 
               'weight' =&gt; 60, 
           ], 
       ], 
]
</code></pre>