php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59019 How can I just use 'udp' connect memcached
Submitted: 2010-01-04 03:39 UTC Modified: 2017-10-24 06:59 UTC
From: huaxingqian at gmail dot com Assigned:
Status: Open Package: memcache (PECL)
PHP Version: 5.2.6 OS: CentOS5.2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: huaxingqian at gmail dot com
New email:
PHP Version: OS:

 

 [2010-01-04 03:39 UTC] huaxingqian at gmail dot com
Description:
------------
memcache version 3.0.3 and memcached version 1.3.2.

How can I use UDP for 'set'.
How can I just use 'udp' connect memcached.

Reproduce code:
---------------
$memcache = new MemcachePool;
$memcache->connect('192.168.0.169', 0, 11223);
$mem_key = 'test_package';
$memcache->set($mem_key, 'sajkdghlghasldghsalghaslgh');
$re = $memcache->get($mem_key);
var_dump($re);

Expected result:
----------------
Warning: MemcachePool::connect() [memcachepool.connect]: Can't connect to 192.168.0.169:0, Failed to parse address "192.168.0.169" (0) in /data/local/apache2/htdocs/test.php on line 6
bool(false)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-03-14 02:07 UTC] hradtke@php.net
The fix for the connection is simple.  The problem is that there are assumptions in the code that rely on TCP connections.  Trying to use a UDP connection is completely unreliable.

I will leave this ticket open until all UDP issues are fixed.
 [2012-12-24 07:38 UTC] 38184788 at qq dot com
$b = new MemcachePool;
$startTime = microtime(true);

$b->connect("udp://127.0.0.1",16222);
$d = $b->get("testKey");

var_dump($d);
====================
the result is false 

and some error
SERVER_ERROR multi-packet request not supported

what problem?
 [2017-10-24 06:59 UTC] kalle@php.net
-Status: Assigned +Status: Open -Assigned To: hradtke +Assigned To:
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sun Dec 15 18:01:25 2019 UTC