I have installed the phabricator, and when browser form browser, encounter exception "openssl_random_pseudo_bytes() returned an unexpected number of bytes (got %d, expected %d)". after verification it happened in" /libphutil/src/filesysem/Filesysem.php in method readRandomBytes (line 392)
$data = openssl_random_pseudo_bytes($number_of_bytes, $strong); if (!$strong) { // NOTE: This indicates we're using a weak random source. This is // probably OK, but maybe we should be more strict here. } if ($data === false) { throw new Exception( pht('openssl_random_pseudo_bytes() failed to generate entropy!')); } if (strlen($data) != $number_of_bytes) { throw new Exception( pht( 'openssl_random_pseudo_bytes() returned an unexpected number of '. 'bytes (got %d, expected %d)!', strlen($data), $number_of_bytes)); }
Is it a bug here, strlen will return string's length, not the bytes length, so it always return exception.
I tried to comment out the lines, the issue gone. but hit another issue to connect with my mysql which should not relate with this.
Can anyone have a look? thanks.