I'm getting the following warning when using PHPass (http://www.openwall.com/phpass/):
open_basedir restriction in effect. File(/dev/urandom) is not within the allowed path(s)
Although this is not a big problem (it will fall back on something else), I'd like not to have this warning. The PHP application should run on different servers, some users will be able to add that path to their allowed open_basedir paths, but others won't have access to that configuration.
My first guess was to check readability with is_readable()
, however, I'm still getting the warning.
The question: How do I check if a certain path or file has been added to the open_basedir paths?
You can read the value of PHP directives with the ini_get()
function:
ini_get('open_basedir')
If the directive's not empty, it should contain a string with one ore more paths separated by PATH_SEPARATOR
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With