Tuesday 27 September 2016

php - PHPass producing warning: is_readable() [function.is-readable]: open_basedir restriction in effect

I'm using PHPass to encrypt passwords stored in my database. When running this code:


if (is_readable('/dev/urandom') && ($fh = @fopen('/dev/urandom', 'rb'))) {
...
}

it produces this warning:


Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/dev/urandom) is not within the allowed path(s):
(/home/d36234:/usr/local/lib/php:/var/apachefs/uploads:/tmp:/etc/file/magic) in /home/d36234/.../PasswordHash.php on line 51

What's wrong here, and how do I fix it?

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...