ID:               34908
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Feedback
+Status:           Open
 Bug Type:         Strings related
-Operating System: Cygwin, Win32
+Operating System: Cygwin
 PHP Version:      5.1.0RC3
 New Comment:

184c185,192
< if (strlen($ui1) == strlen($ui2) && strlen($ui1) == 19 && $ui1 !=
$ui2) {
---
> 
> if (strtoupper(substr(php_uname(), 0, 6)) === 'CYGWIN') {
>   $expected_length = 29;
> } else {
>   $expected_length = 19;
> }
> 
> if (strlen($ui1) == strlen($ui2) && strlen($ui1) == $expected_length
&& $ui1 != $ui2) {




Previous Comments:
------------------------------------------------------------------------

[2005-10-20 11:16:19] [EMAIL PROTECTED]

So make a patch then and make sure that it works for you on Cygwin.
I don't have Cygwin anywhere and I'm sure Ilia doesn't have it either.

------------------------------------------------------------------------

[2005-10-20 10:33:48] [EMAIL PROTECTED]

Tony:
-----
You don't need to find that out. Either set it always to true or always
to false:

$ui1 = uniqid($str, false);
$ui2 = uniqid($str, false);

Of course you could also use php_uname() for that. Cygwin identifies as
Cygwin, so there is no problem here.

Ilia:
-----
That behaviour is not documented on http://de2.php.net/uniqid

------------------------------------------------------------------------

[2005-10-19 23:17:45] [EMAIL PROTECTED]

Do you know of any way to detect if PHP is running on Cygwin from PHP
itself?

------------------------------------------------------------------------

[2005-10-19 19:38:23] [EMAIL PROTECTED]

Reopening.

In that case, tests/strings/001.phpt needs to behave different on
Cygwin than on other systems.

------------------------------------------------------------------------

[2005-10-19 15:40:28] [EMAIL PROTECTED]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

On Cygwin systems to ensure a trully unique id the more_entropy is
enabled by default, which causes another 9 characters to appear at the
end. This is a not a bug.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/34908

-- 
Edit this bug report at http://bugs.php.net/?id=34908&edit=1

Reply via email to