Am Di 06 Jul 2010 04:09:57 CEST schrieb Chuck Hagenbuch <[email protected]>:
microtime() . mt_rand() - does that work?

Yes, mt_rand gives a unique number.

If so, what virtualization software are you using? If this is a common thing, please submit a patch.

We use virtualbox. I don't know whether it is common: On another virtual machine on the same host-system the microtime()-calls are in about 90% different, 10% similar (with the short script I posted some time ago).

Maybe, you could insert the mt_rand() funktion to avoid further problems, like I did now.


--- lib/Horde/MIME/Part.php      2010-06-16 19:07:59.352716685 +0200
+++ lib/Horde/MIME/Part.php      2010-07-06 13:32:49.548287758 +0200
@@ -1381,7 +1381,7 @@
     function setContentID($cid = null)
     {
         if (is_null($this->_contentid)) {
-            $this->_contentid = (is_null($cid)) ? (base_convert(microtime(), 
10, 36) . '@' . $_SERVER['SERVER_NAME']) : $cid;
+            $this->_contentid = (is_null($cid)) ? 
(base_convert(microtime().mt_rand(), 10, 36) . '@' . $_SERVER['SERVER_NAME']) : 
$cid;
         }
         return $this->_contentid;
     }
-- 
IMP mailing list - Join the hunt: http://horde.org/bounties/#imp
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: [email protected]

Reply via email to