Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I get a lot "substr() expects parameter 3 to be long, string given memcache.inc:208 " (maybe 50-100) when I run drush (just one time).
Comment | File | Size | Author |
---|---|---|---|
#4 | memcache-1305696_4.patch | 850 bytes | drasgardian |
#1 | memcache-1305696.patch | 1.09 KB | Jody Lynn |
Comments
Comment #1
Jody LynnI just got the same problem all of a sudden. It's coming from the menu cache. This patch shut it up.
Comment #2
BerdirAre you using the most recent 7.x-1.x-dev snapshot?
Your patch seems to be against an old version of this module, the dmemcache_key() does not exist anymore.
Comment #3
JeffSheltren CreditAttribution: JeffSheltren commentedClosing due to inactivity. Please re-open if you're still having problems.
Comment #4
drasgardian CreditAttribution: drasgardian commentedI ran into the same thing with the latest dev:
Warning: substr() expects parameter 3 to be long, string given in MemCacheDrupal->wildcards() (line 274
Following the lead of the patch above, the attached patch makes the error go away. But I don't really know how the wildcard stuff is working.
Comment #5
erikwebb CreditAttribution: erikwebb commentedThis seems like we should address why $flush_length would not be set to begin with. We should elsewhere default this to zero or find the cause of an empty value.
Comment #6
lampson CreditAttribution: lampson commentedI tried 7.-x-1.5 stable as well as 7.x-1.x-dev but no luck I still get this error. I applied the patch on the stable branch which worked for me.
Comment #7
Jeremy CreditAttribution: Jeremy commentedPerhaps this could happen with an invalid $cid (for example, if an array was passed in. With PHP 5.3.0 or greater, strlen() returns NULL when executed on arrays, and an E_WARNING level error is emitted.
Are you seeing any E_WARNING errors? Do you know what $cid is causing this? Is there anything unique about your installation?
Comment #9
Jeremy CreditAttribution: Jeremy commentedAs I can only see one way that this would happen, I've added a check to prevent it; if you get here it will write the following to the log:
Invalid cache id received in memcache.inc wildcards() of type ___
If you're seeing this message after updating to the latest code, please paste the log here; this shouldn't happen.
Comment #10
Jeremy CreditAttribution: Jeremy commented@hitfactory reports hitting this log already in #2650646: Warning: Invalid argument supplied for foreach() in MemCacheDrupal->wildcards. Needs to be reviewed before the next release.
Comment #11
Jeremy CreditAttribution: Jeremy commentedComment #12
Pobtastic CreditAttribution: Pobtastic at ArcadeGeek LTD commentedJust noticed this while using drush today;
Jan 26 11:33:12 ip-10-21-2-230 drupal: http://default 1485430392 memcache 127.0.0.1 http://default/ 0 Invalid cache id received in memcache.inc wildcards() of type integer.
Nothing else in the logs...
Comment #13
amme CreditAttribution: amme commentedConfirm. there is log message when using drush
WD memcache: Invalid cache id received in memcache.inc wildcards() of type integer.
Comment #15
Jeremy CreditAttribution: Jeremy commentedInteger cid's are allowed; patch committed to fix this.
Comment #17
Jeremy CreditAttribution: Jeremy commentedComment #19
Jeremy CreditAttribution: Jeremy commentedBackported.