linux中的open_basedir plesk错误

时间:2016-11-01 17:54:19

标签: php linux plesk open-basedir

我正在尝试从plesk中的另一个网站空间加载脚本。我在网站空间中启用了open_basedir,在我的脚本中插入了

include "/var/www/vhosts/example.com/httpdocs/app/";

但是这不起作用,我在日志中收到以下错误:

mod_fcgid: stderr: PHP Warning: include(/var/www/vhosts/example.com/httpdocs/eshop): failed to open stream: No such file or directory in /var/www/vhosts/test.example.com/httpdocs/index.php on line 2

mod_fcgid: stderr: PHP Warning: include(/var/www/vhosts/example.com/httpdocs/app): failed to open stream: No such device in /var/www/vhosts/test.example.com/httpdocs/index.php on line 2


mod_fcgid: stderr: PHP Warning: include(): Failed opening '/var/www/vhosts/example.com/httpdocs/app/' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/vhosts/test.example.com/httpdocs/index.php on line 2

我认为这与我以错误的方式写道路的事实有关,但我不明白什么是正确的。

1 个答案:

答案 0 :(得分:1)

它不起作用,因为另一个订阅的文件归另一个系统用户所有。 最好将必要的代码放在同一个订阅中或某个共享位置,例如/usr/share/pear/usr/share/php

plesk php include_path