When the error message 'memcached not showing in phpinfo' appears, it could be due to several factors. One possible reason is that even though the Memcached extension has been installed and enabled on your server, it may not have been correctly integrated with your PHP installation. Another reason could be a misconfiguration of the Memcached extension in the PHP.ini file. It is also possible that the web server needs to be restarted after installing or enabling the Memcached extension.
To resolve this error, several steps can be taken. Firstly, you should verify if the Memcached extension is correctly installed and enabled on your server by creating a PHP file with the following code:
<?php phpinfo(); ?>
Then, search for the Memcached section in the output of this PHP script. If the Memcached section is absent, it implies that the Memcached extension, though installed and enabled, is not properly set up with your PHP configuration.
If the Memcached section is present but empty, then it is likely that the Memcached extension settings are not configured appropriately. In such cases, you need to manually configure the PHP.ini file.
Editing the PHP.ini file and updating the settings specific to Memcached is an important step. The Memcached extension should be loaded using the following command:
If you've already done this and still face the issue, it would be worthwhile to double-check the location from which PHP is loading extensions to ensure memcached.so is located in that directory.
Lastly, ensure you restart your web server anytime changes are made to the PHP.ini file. After the web server has been restarted, the Memcached extension should appear in the phpinfo() output.