First off, (from what I can tell...) Memcache is working properly. I have the settings.php file set, I have memcache.so & memcached.so installed properly and I'm even getting hit/miss data from the status page.

However, every time I hit:

  • Refresh Data
  • View Host Stats
  • Variables

on the /admin/reports/status/memcache page, I get the following error from devel on any normal site page:

Notice: Undefined variable: _SERVERS in memcache_status_memcache() (line 28 of /home/user/public_html/sites/all/modules/contrib/memcache_status/memcache_status.admin.inc).

refresh the site page and the error goes away until I hit any of the links from the memcache status page, then again view a site page.

Any thoughts?

Comments

swati.karande’s picture

Hi,
You simply need to define $_SERVERS variable in "memcache_status.admin.inc" file.
global $MEMCACHE_SERVERS, $PHP_SELF, $_SERVERS; // (line no 26)

iamEAP’s picture

Looks simple enough. @swati.karande or @philsward, would one of you be able to create a patch for review?

philsward’s picture

Well, ideally that "sounds" right and I would say this is correct outside of the Druapl realm of memcached, but the README for the memcache status module explicitly says to get rid of those variables because the module will pull the server info from other places. So I commented them out. (and sure enough, it's working fine with the lines commented out)

I guess my question at this point is: "Should something be put into the variables of that file or not?" If so, I guess we should push to get the Readme fixed instead :-)

philsward’s picture

Whoa, Just saw you said "memcache_status.admin.inc" I was thinking you were talking about the memcache_status.php.inc file...

Whoops!

I suppose I can try out your suggestion but we should probably see about getting the readme updated if it's something that is "normal". Gonna kinda suck to have to set that each time the module gets updated :-/

iamEAP’s picture

Status: Active » Needs review
StatusFileSize
new608 bytes

After looking into it, this appears to be a typo.

philsward’s picture

@iamEAP Looks good to me!!

Just got done patching and the errors seem to be gone : ) I'll let you know if I have any problems after doing some more playing around but I think you might have it fixed.

iamEAP’s picture

Have you come across any issues after running with the patch for awhile, @philsward?

philsward’s picture

Nope! I sure haven't : )

I'm pretty confident you can commit the patch and close this issue as resolved. Thanks again!

iamEAP’s picture

Status: Needs review » Fixed

Thanks for testing and reporting back, @philsward.

Committed: 6c8b35f

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.