Can I access /dev/urandom with open_basedir in effect?

后端 未结 4 2109
南方客
南方客 2021-01-02 07:52

I want to use phpass-0.3 in Codeigniter, but I get the following error due to open_basedir:

A PHP Error was encountered
Severity

4条回答
  •  独厮守ぢ
    2021-01-02 08:40

    phpass is trying to access /dev/urandom, which is not allowed in your php.ini To resolve this issue, you must suppress the warning. To do so, just add @ before is_readable, like this :

    ...
    @is_readable('/dev/urandom')
    ...
    

提交回复
热议问题