Hi Pierre,
Why is uniqid()
is not guarantee uniqueness under windows?
https://bugs.php.net/bug.php?id=65626
It seems PHP_WIN32 and CYGWIN check is obsolete.
Could it be removed?
Regards,
--
Yasuo Ohgaki
yohgaki@ohgaki.net
Hi Yasuo,
Hi Pierre,
Why is
uniqid()
is not guarantee uniqueness under windows?
its base are microseconds, so nothing prevents to usleep()
in user space.
It's also documented to be nonsecure, so isn't it just the expected
behavior?
It seems PHP_WIN32 and CYGWIN check is obsolete.
Could it be removed?
Never compiled with cygwin. However what stands in the code might be true
needed, as cygwin is proxying native APIs, so it is expected to be much
slowlier. Maybe there are other reasons for that, though.
Regards
Anatol
Hi Pierre,
Why is
uniqid()
is not guarantee uniqueness under windows?https://bugs.php.net/bug.php?id=65626
It seems PHP_WIN32 and CYGWIN check is obsolete.
Could it be removed?
Not sure, we have to test to see if it is necessary.
But for cygwin, we do not support it so I won't do any testing with it.
Cheers,
Pierre
@pierrejoye | http://www.libgd.org
Hi all,
Hi Pierre,
Why is
uniqid()
is not guarantee uniqueness under windows?https://bugs.php.net/bug.php?id=65626
It seems PHP_WIN32 and CYGWIN check is obsolete.
Could it be removed?Not sure, we have to test to see if it is necessary.
But for cygwin, we do not support it so I won't do any testing with it.
https://github.com/yohgaki/php-src/commit/6c36a82ee84cfda0cb14c95b0c035849f73d8354
Here is simple patch to test for windows. Could anyone try to see if it
works?
According to PHP_FUNCTION(microtime), it should work.
Regards,
--
Yasuo Ohgaki
yohgaki@ohgaki.net