PECL extension by default doesn't include SASL authentication, it should be explicitly asked at configure time. Excerpt from http://www.php.net/manual/en/memcached.installation.php: SASL authentication support is disabled by default. To enable it, use --enable-memcached-sasl switch. This requires that libsasl2 has been installed and that libmemcached has been built with SASL support enabled. Excerpt from http://www.php.net/manual/en/memcached.setsaslauthdata.php: This method is only available when the memcached extension is build with SASL support. Please refer to Memcached setup for how to do this. Fix: Add a SASL option: - adding --enable-memcached-sasl to ./configure - adding security/cyrus-sasl2 as dependency (should have been done by libmemcached) If you wish to do it without the option: - Argument pro: databases/libmemcached now always add SASL support - Argument against: databases/memcached still provides the option (but we're in the client side, not the server side, so shouldn't we be coherent with libmemcached choice?) How-To-Repeat: <?php $memcached = new Memcached(); $memcached->addServer('localhost', 11211); $memcached->setSaslAuthData('username', 'password'); //Fails, as setSaslAuthData doesn't exist
Responsible Changed From-To: freebsd-ports-bugs->miwi miwi@ wants this port PRs (via the GNATS Auto Assign Tool)
State Changed From-To: open->feedback Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Maintainer of databases/pecl-memcached, Please note that PR ports/182449 has just been submitted. If it contains a patch for an upgrade, an enhancement or a bug fix you agree on, reply to this email stating that you approve the patch and a committer will take care of it. The full text of the PR can be found at: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/182449 -- Edwin Groothuis via the GNATS Auto Assign Tool edwin@FreeBSD.org
Thanks, would you like to offer a patch to include these features ? On Sat, Sep 28, 2013 at 12:00:11AM +0000, Edwin Groothuis wrote: > Maintainer of databases/pecl-memcached, > > Please note that PR ports/182449 has just been submitted. > > If it contains a patch for an upgrade, an enhancement or a bug fix > you agree on, reply to this email stating that you approve the patch > and a committer will take care of it. > > The full text of the PR can be found at: > http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/182449 > > -- > Edwin Groothuis via the GNATS Auto Assign Tool > edwin@FreeBSD.org -- * Gea-Suan Lin (public key: Using https://keyserver.pgp.com/ to search) * If you cannot convince them, confuse them. -- Harry S Truman
Responsible Changed From-To: miwi->freebsd-port-bugs back to pool.
Responsible Changed From-To: freebsd-port-bugs->freebsd-ports-bugs Canonicalize assignment.
Someone somewhere found this problem and the solution, but somehow = nobody followed up the friendly request to do the work: > From: Gea-Suan Lin <gslin@gslin.org> > To: bug-followup@FreeBSD.org > Date: Tue, 22 Oct 2013 17:48:24 +0800 >=20 > Thanks, would you like to offer a patch to include these features ? >=20 > On Sat, Sep 28, 2013 at 12:00:11AM +0000, Edwin Groothuis wrote: > > Maintainer of databases/pecl-memcached, > >=20 > > Please note that PR ports/182449 has just been submitted. > >=20 This little patch does provide the needed option (I did not look any = deeper than that). Index: databases/pecl-memcached/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- databases/pecl-memcached/Makefile (revision 352016) +++ databases/pecl-memcached/Makefile (working copy) @@ -25,8 +25,9 @@ USE_PHP_BUILD=3D yes CONFIGURE_ARGS+=3D--with-libmemcached-dir=3D${LOCALBASE} =20 -OPTIONS_DEFINE=3D IGBINARY +OPTIONS_DEFINE=3D IGBINARY SASL IGBINARY_DESC=3D Binary serializer support +SASL_DESC=3D Cyrus SASL support =20 .include <bsd.port.options.mk> =20 @@ -36,4 +37,9 @@ RUN_DEPENDS+=3D = ${LOCALBASE}/lib/php/${PHP_EXT_DIR}/igbinary.so:${PORTSDIR}/converters/igb= inary .endif =20 +.if ${PORT_OPTIONS:MSASL} +CONFIGURE_ARGS+=3D--enable-memcached-sasl +LIB_DEPENDS+=3D sasl2:${PORTSDIR}/security/cyrus-sasl2 +.endif + .include <bsd.port.mk>
niels, Can you resubmit this corrupt patch as an attachment? assigning to maintainer in the meantime...
(In reply to John Marino from comment #8) > niels, > Can you resubmit this corrupt patch as an attachment? Hi John I am sorry, my ports tree with that patch got lost while updating, and as I am not currently using nor building any of the pecl packages, someone who actually uses this stuff should make sure this is the correct way to go. Yet, in order to build and link databases/pecl-memcached with SASL support, Makefile should be changed to: - have the word 'SASL' added to OPTIONS_DEFINE - have a SASL_DESC variable with some value like "Cyrus SASL support" - have an .if ${PORT_OPTIONS:MSASL} clause, containing: +CONFIGURE_ARGS+= --enable-memcached-sasl +LIB_DEPENDS+= sasl2:${PORTSDIR}/security/cyrus-sasl2 That's all there is to it. Except someone should then build, install and test :-)
delphij@ passes this port to me.
A commit references this bug: Author: sunpoet Date: Sat Mar 21 20:51:00 UTC 2015 New revision: 381867 URL: https://svnweb.freebsd.org/changeset/ports/381867 Log: - Add SASL option PR: 182449 Submitted by: <dereckson@gmail.com>, <niels.poppe@gmail.com> Changes: head/databases/pecl-memcached/Makefile
Committed. Thanks!