![如何在 php、CentOs 中打开对 PEAR 目录的访问?](https://linux22.com/image/704687/%E5%A6%82%E4%BD%95%E5%9C%A8%20php%E3%80%81CentOs%20%E4%B8%AD%E6%89%93%E5%BC%80%E5%AF%B9%20PEAR%20%E7%9B%AE%E5%BD%95%E7%9A%84%E8%AE%BF%E9%97%AE%EF%BC%9F.png)
/home/admin/tmp
是 admin admin -rwrw...
/usr/share/pear/PEAR.php
是 admin admin -rwrw...
我sys_temp_dir
在 php.ini 文件中删除了它!
Warning: require_once(): open_basedir restriction in effect. File(/usr/share/pear/PEAR.php) is not within the allowed path(s): (/home/admin/web/domain/public_html:/home/admin/tmp) in /home/admin/web/domain/public_html/w/vendor/autoload.php on line 8
Warning: require_once(/usr/share/pear/PEAR.php): failed to open stream: Operation not permitted in /home/admin/web/domain/public_html/w/vendor/autoload.php on line 8
答案1
您需要open_basedir
在您的 中更新php.ini
以包含/usr/share/PEAR
。