php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #40401 Wrong parameter description in Memcache::connect
Submitted: 2007-02-08 12:44 UTC Modified: 2007-02-08 13:08 UTC
From: timo dot witte at kwick dot de Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS: Linux 2.6
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
47 - 42 = ?
Subscribe to this entry?

 
 [2007-02-08 12:44 UTC] timo dot witte at kwick dot de
Description:
------------
Memcache::connect
The timeout Parameter is NOT in seconds but in microseconds!

Reproduce code:
---------------
$mc = new Memcache;
$mc->connect("someremotememcache", 11211, 1);

Expected result:
----------------
$mc should be connected

Actual result:
--------------
$mc returns with connection timed out instantly (not after a second but a microsecond)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-02-08 12:50 UTC] tony2001@php.net
No, it's indeed seconds.
But the timeout is not used if the host is down, rejects the connection and in any other situation when your system's select() fails right away.
 [2007-02-08 13:08 UTC] timo dot witte at kwick dot de
Oh sorry i just asked my Boss, he has changed the timeout from seconds to mircroseconds in the client libary :-( so that?s no bug at all.. sry
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 15 20:01:29 2024 UTC