Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

memcached auth #32

Open
szepeviktor opened this issue Apr 5, 2014 · 7 comments
Open

memcached auth #32

szepeviktor opened this issue Apr 5, 2014 · 7 comments

Comments

@szepeviktor
Copy link

Please consider supporting
http://redislabs.com/memcached-cloud
Redis Labs needs SASL auth for memcached.

Thank you!!

@tollmanz
Copy link
Owner

tollmanz commented Apr 5, 2014

Thanks for the suggestion! Can you give me more information about what would be needed to support the service? Does it make sense to shoehorn this support into this library, or would it make more sense to build a separate library?

@szepeviktor
Copy link
Author

@szepeviktor
Copy link
Author

szepeviktor commented Apr 5, 2014

I think it is a oneliner:
http://php.net/manual/en/memcached.setsaslauthdata.php

@szepeviktor
Copy link
Author

szepeviktor commented Apr 5, 2014

And the missing doc:
http://php.net/manual/en/book.memcached.php#110988
Actually it is a 3-liner

@tollmanz tollmanz mentioned this issue Apr 5, 2014
@tollmanz
Copy link
Owner

tollmanz commented Apr 5, 2014

In response to your comment on #33, I think we'd need to update the $memcached_servers global variable in the wp-config.php file. Then in WP_Object_Cache::__construct(), we need to read in the auth variables and connect to the remote Memcached instance.

@szepeviktor
Copy link
Author

Yes

define('MEMCACHE_SERVERS', serialize(array(
    array(
        '127.0.0.1',
        11211,
        'username',
        'passw0'
    ),
    array(
        'domain.com',
        11211,
        'username',
        'passw0'
    )
)));
$memcache_servers = unserialize(MEMCACHE_SERVERS);
// in a loop
if (isset($memcache_servers[$i][3])) {
    // need to auth
}

@tollmanz
Copy link
Owner

tollmanz commented Apr 7, 2014

@szepeviktor If you would like to work on a pull request for this feature, I would be happy to consider it. I am not particularly motivated to add SASL support at this time as I am not convinced it is very useful. I have no aversion to accepting a good PR; rather, I just do not feel motivated to investigate and implement the SASL connection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants