ID: 34908 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Closed Bug Type: Strings related Operating System: Cygwin PHP Version: 5.1.0RC3 New Comment:
This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2005-10-20 12:23:45] [EMAIL PROTECTED] 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) { ------------------------------------------------------------------------ [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. ------------------------------------------------------------------------ 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
