open_basedir linux plesk 错误
open_basedir in linux plesk error
我正在尝试从 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
我认为这与我以错误的方式编写路径这一事实有关,但我不明白什么是正确的。
它不起作用,因为另一个订阅的文件由另一个系统用户拥有。
最好将必要的代码放在同一个订阅或某些共享位置,如 /usr/share/pear
或 /usr/share/php
:
我正在尝试从 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
我认为这与我以错误的方式编写路径这一事实有关,但我不明白什么是正确的。
它不起作用,因为另一个订阅的文件由另一个系统用户拥有。
最好将必要的代码放在同一个订阅或某些共享位置,如 /usr/share/pear
或 /usr/share/php
: