Jack01 Posted March 14, 2017 Share Posted March 14, 2017 Hello, i'm tuning a PrestaShop installation, and i found this error in the error_log: [14-Mar-2017 15:14:25 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/cp22z7i2/public_html/classes/cache/CacheMemcache.php on line 52 [14-Mar-2017 15:14:26 UTC] PHP Warning: Memcache::getextendedstats(): No servers added to memcache connection in /home/cp22z7i2/public_html/classes/cache/CacheMemcache.php on line 50 that corresponds to: $all_slabs = $this->memcache->getExtendedStats('slabs'); foreach ($all_slabs as $server => $slabs) { I have my configuration in BO like this: How do I have to configure memcache in order to work properly? Or is this just a warning that I can ignore? Thanks. Link to comment Share on other sites More sharing options...
rocky Posted March 15, 2017 Share Posted March 15, 2017 You need to click "Add a server" and enter the IP addresses and ports you want to bind, e.g. 127.0.0.1:11211. Link to comment Share on other sites More sharing options...
Knowband Plugins Posted March 22, 2017 Share Posted March 22, 2017 Please take a look at the following link, it might help you fix the second issue in the error_log: https://github.com/akirk/php-ratelimiter/issues/1 Regarding the first issue in the error_log (i.e. Wrong Invalid argument supplied for foreach) you can apply an IF statement. For example: if ($all_slabs) { --- Foreach loop goes here --- } Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now