php open_basedir 限制生效 文件不在允许的路径内
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16872674/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
open_basedir restriction in effect File is not within the allowed path
提问by Noob Kraker
Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home/futbol/data:.:/tmp:/usr/share/php:/usr/share/pear:/usr/local/bin) in /home/futbol/data/www/futbol.kg/libraries/joomla/filesystem/folder.php on line 451
I get this Warning in joomla, after I log in, i really don't have idea on how to fix this, maybe there is need to change some server settings, but which one?, thanks
我在 joomla 中收到此警告,登录后,我真的不知道如何解决此问题,也许需要更改一些服务器设置,但是哪一个?,谢谢
回答by nibra
Check your configuration.php
file. Ensure that the log and tmp entries look like
检查您的configuration.php
文件。确保日志和 tmp 条目看起来像
public $log_path = '/home/futbol/data/www/futbol.kg/logs';
public $tmp_path = '/home/futbol/data/www/futbol.kg/tmp';
If these entries are correct, and you still get that message, disable all non-core system plugins, as it then must be one of them causing the problem.
如果这些条目是正确的,并且您仍然收到该消息,请禁用所有非核心系统插件,因为它必须是导致问题的其中之一。
回答by Arnaud Le Blanc
open_basedir restriction in effect
open_basedir 限制生效
This means that you've set the open_basedir
setting in your php.ini; and joomla is trying to read something that's not in the configured basedir.
这意味着您已经open_basedir
在 php.ini 中设置了该设置;并且 joomla 正在尝试读取不在配置的 basedir 中的内容。
Remove open_basedir
from your php.ini. This gives a false sense of security (it can easily be bypassed), and causes more troubles than it solves.
open_basedir
从您的 php.ini 中删除。这给人一种虚假的安全感(它很容易被绕过),并且造成的麻烦比它解决的要多。
回答by kmas
Try to insert ini_set('open_basedir', YOUR_BASE_DIR); into the file index.php (root of Joomla). If php settings let you override configuration, it should work.
尝试插入 ini_set('open_basedir', YOUR_BASE_DIR); 进入文件 index.php(Joomla 的根目录)。如果 php 设置让您覆盖配置,它应该可以工作。