• Resolved Brandon Yap

    (@byap00)


    I’m seeing an error thrown when using the plugin with ACLs. Really hoping it’s not just me. I can’t click on the Diagnostics tab to get more detailed info but here’s what WordPress spits out in Debug mode:

    PHP Fatal error:  Uncaught TypeError: strlen(): Argument #1 ($string) must be of type string, array given in /<docroot>/wp-content/plugins/redis-cache/dependencies/predis/predis/src/Connection/Factory.php:167

    I’ve replaced part of the path with <docroot> but that shouldn’t matter.

    In wp-config.php, the line that seems to kill it is the WP_REDIS_PASSWORD setting.

    define(‘WP_REDIS_PASSWORD’, [‘myusername’, ‘mypassword’]);

    If I remove that line all is good.

    The plugin has worked fine for many months until I upgraded it to the latest version. Apologies but I don’t remember the previous version.

    Hoping this is just an ACL related bug that was introduced in the latest version?

    • This topic was modified 1 year, 6 months ago by Brandon Yap.
    • This topic was modified 1 year, 6 months ago by Brandon Yap.
Viewing 5 replies - 16 through 20 (of 20 total)
  • Plugin Author Till Krüss

    (@tillkruess)

    Nope, I can now replicate it.

    Fatal error: Uncaught Error: strlen(): Argument #1 ($string) must be of type string, array given
    in /Users/Till/Development/Repositories/redis-cache/dependencies/predis/predis/src/Connection/Factory.php on line 167
    
    
    Plugin Author Till Krüss

    (@tillkruess)

    This was fixed in: https://github.com/rhubarbgroup/redis-cache/commit/0a6e4867907728786c5489c54863494674162967

    In the meantime you can actually use:

    define( 'WP_REDIS_PASSWORD', 'password');
    define( 'WP_REDIS_USERNAME', 'alice');
    Thread Starter Brandon Yap

    (@byap00)

    Awesome that’s great news. Many thanks Till!

    Thread Starter Brandon Yap

    (@byap00)

    Ok when using WP_REDIS_USERNAME and WP_REDIS_PASSWORD, the plugin progresses, but then throws another error on a different screen.

    WRONGPASS invalid username-password pair or user is disabled.

    The user being used is actually active because I can AUTH as that user in redis-cli and set/get keys.

    This is what displays in the debug log

    RedisException: WRONGPASS invalid username-password pair or user is disabled. in /<docroot>/wp-content/object-cache.php:732
    • This reply was modified 1 year, 6 months ago by Brandon Yap.
    Thread Starter Brandon Yap

    (@byap00)

    I’ve manually made the changes to the include files mentioned in your git commit and want to confirm those do work, so i’ll just wait for a new release. Just wanted you to know defining WP_REDIS_PASSWORD and WP_REDIS_USERNAME separately does not work.

Viewing 5 replies - 16 through 20 (of 20 total)
  • The topic ‘Error thrown when ACLs are used’ is closed to new replies.