dp5657087 2015-09-18 08:25
浏览 253
已采纳

openbase_dir警告说文件不在路径中,但然后正确列出路径

I am using MDB2 in an old php project, which I have just moved to a new server.

The project framework relies on some open_basedir config.

But there's something pretty odd.

I get the following error, which says a file /usr/share/pear/MDB2/Driver/mysql.php is not within allowed paths, but then lists the path to the file /usr/share/pear/MDB2/Driver in the list of allowed paths...

Why might this be?

PHP Warning:  is_readable(): open_basedir restriction in effect.
File(/usr/share/pear/MDB2/Driver/mysql.php) is not within the allowed path(s): 
(/var/some-paths:/usr/share/php:/usr/share/pear/MDB2/Driver) in /usr/share/php/MDB2.php on line 933
  • 写回答

1条回答 默认 最新

  • duanlidi1051 2015-09-18 11:16
    关注

    The solution was that the specific file itself didn't exist.

    The Pear optional features, like the specific DB types, have to be installed separately and this hadn't been done.

    The error message is in a way misleading. I guess technically it is correct, but it makes the error appear to be an issue with open_basedir config rather than a file not found.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 求差集那个函数有问题,有无佬可以解决
  • ¥15 【提问】基于Invest的水源涵养
  • ¥20 微信网友居然可以通过vx号找到我绑的手机号
  • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
  • ¥15 解riccati方程组
  • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
  • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名
  • ¥65 汇编语言除法溢出问题