in reply to Perl Memcached client under Windows XP

You might do well to identify which version of C::MC you have, and/or post the line identified as having the error.

The latest version, #365 is my ($ret, $offset) = (undef, 0); which couldn't possible produce that error.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP an inspiration; A true Folk's Guy

Replies are listed 'Best First'.
Re^2: Perl Memcached client under Windows XP
by brancusi (Novice) on May 27, 2010 at 11:09 UTC

    It's Version 1.26

    Here's the entire output. I don't think the line numbers are that helpful though, I'm pretty sure the problem is to do with socket(...) not actually opening/creating the socket, but as it doesn't seem to return any error codes and I'm not sure what it is doing under the hood, I'm a bit lost as to where to go next for a fix.

    I note that the Activestate examples are using IO::Socket rather than socket() directly and I further note that IO::Socket contains specifics for Win32, so that's where I'm inclined to think the problem lies.

    Use of uninitialized value $sock in ref-to-glob cast at C:/Perl/site/l +ib/Cache/Memcached.pm line 368. Use of uninitialized value in vec at C:/Perl/site/lib/Cache/Memcached. +pm line 368. Use of uninitialized value $sock in ref-to-glob cast at C:/Perl/site/l +ib/Cache/Memcached.pm line 375. Use of uninitialized value in vec at C:/Perl/site/lib/Cache/Memcached. +pm line 375. Use of uninitialized value $sock in ref-to-glob cast at C:/Perl/site/l +ib/Cache/Memcached.pm line 376. send() on unopened socket at C:/Perl/site/lib/Cache/Memcached.pm line +376. Use of uninitialized value $res in numeric gt (>) at C:/Perl/site/lib/ +Cache/Memcached.pm line 379. Use of uninitialized value $sock in hash element at C:/Perl/site/lib/C +ache/Memcached.pm line 181. Use of uninitialized value $sock in hash element at C:/Perl/site/lib/C +ache/Memcached.pm line 168.

      Sorry. I still can't make the error messages match up with the code. It looks for all the world like it is simply failing to connect to the server, but why that should be I haven't a clue. It also uses non-blocking sockets, but makes no provision to handle Windows special requirements in that regard, which doesn't bode well.

      A quick look around found this MemCached-Windows. There seems to be a lot of further info and special Windows ports of the code...maybe you can make progress there.


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
        I'm aware of MemCached-Windows, I already am using that as my server, however my issue is with the client end and that just points back to the same CPAN library :(

        Given I can telnet to the server from the same system that is trying to be a client, I don't see why it won't open the socket (ie there should be no firewall issue). I've tried it against a second Memcached server that is running on ubuntu and have the same problem.

        :-(

        --------- UPDATED -----------

        To add insult to injury, if I install the memcache win32 SERVER on my WinXP system, I can connect to it from a Win 2003 client using exactly the same test code and everything is fine. However the windows XP system refuses to even connect to the localhost system!

        It seems to me that the client library Cache::Memcache doesn't work on WinXP at all with Activestate Perl - can someone out there confirm that it DOES actually work fine so at least I know it's something about my system that is the issue?

        I've tried un-installing and reverting to version 1.24 rather than 1.26 but the same fault remains