私はCodeIgniterのでphpass-0.3を使用したいが、私は原因open_basedir
に次のエラーが表示されます。open_basedirを使って/ dev/urandomにアクセスできますか?
A PHPエラーが
重大度発生しました:警告
メッセージ:is_readable()[function.is可読を]:open_basedir の制限が適用されます。 (/ home/phginep:/ usr/lib/php:/ usr/local/lib/php:/ tmp)
ファイル名:phpass-0.3 /PasswordHash.php
行番号:コードに続いて51
:
function get_random_bytes($count)
{
$output = '';
if (is_readable('/dev/urandom') && //Line Number: 51
($fh = @fopen('/dev/urandom', 'rb'))) {
$output = fread($fh, $count);
fclose($fh);
}
if (strlen($output) < $count) {
$output = '';
for ($i = 0; $i < $count; $i += 16) {
$this->random_state =
md5(microtime() . $this->random_state);
$output .=
pack('H*', md5($this->random_state));
}
$output = substr($output, 0, $count);
}
return $output;
}
が、私はこれを回避するために何かできることはありますか?
本当に素敵な説明。 – elliotrock