ISPConfig 3,忍者设置我的 open_basedir
我有一个 PHP 库,我想将其共享给服务器上的多个虚拟主机,但 open_basedir 指令造成了麻烦。
我使用 ISPConfig 3 来管理站点。
PHP 警告:include():open_basedir 限制生效。 文件(/var/toaster/latest/__server/core/cms.php)不在 允许的路径:第 5 行[cut]中的([cut:several paths])
说:
加载的配置文件:/etc/php5/cgi/php.ini
open_basedir:[剪切:多个路径](本地值和主值)
/etc/php5/cgi/php.ini 说:
;open_basedir =
/usr/local/ispconfig/server/conf/vhost.conf.master 说:
php_admin_value open_basedir
但是 /etc/apache2/sites-enabled/[cut:domain].vhost 说:
绝对没有关于 open_basedir 的信息
所有这意味着我未知的东西设置了我的 open_basedir 指令。什么,哪里?
I have a PHP library that I'd like to share to several vhosts on my server, but the open_basedir directive is causing troubles.
I use ISPConfig 3 to manage the sites.
PHP Warning: include(): open_basedir restriction in effect.
File(/var/toaster/latest/__server/core/cms.php) is not within the
allowed path(s): ([cut:several paths]) in [cut] on line 5
phpinfo() says:
Loaded Configuration File: /etc/php5/cgi/php.ini
open_basedir: [cut:several paths] (local & master value)
/etc/php5/cgi/php.ini says:
;open_basedir =
/usr/local/ispconfig/server/conf/vhost.conf.master says:
<tmpl_if name='security_level' op='==' value='20'>
php_admin_value open_basedir <tmpl_var name='php_open_basedir'>
</tmpl_if>
but /etc/apache2/sites-enabled/[cut: domain].vhost says:
absolutely nothing about open_basedir
All this means that something unknown to me sets my open_basedir directive. What, Where?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
比预期容易和明显得多。
在 ISPConfig 中“Web 域”的“选项”面板中,有一个标记为
PHP open_basedir
的文本框。我仍然不知道将创建或编辑哪个确切的配置文件,但它可以工作。还值得一提的是这个文本框 - 创建新站点时的默认值可以在以下位置更改:
系统>>服务器配置>>网页>> PHP 设置>> PHP open_basedir
Was much easier and obvious than expected.
In the "Options" panel of the "Web Domain" in ISPConfig there is a textbox labeled
PHP open_basedir
. I still don't know which exact config file that is going to create or edit, but it works.Also worth mentioning for this textbox - the default value when creating a new site can be changed in:
System >> Server Config >> Web >> PHP Settings >> PHP open_basedir
非常感谢您的回答!我四处寻找,答案就在选项屏幕上!谢谢你,谢谢你,谢谢你!
经过进一步调查,ISPConfig 在虚拟主机启动时执行 php-cgi。启动脚本位于 /var/www/php-fcgi-scripts/web?/.php-fcgi-starter 中,其中 ?代表客户端内的站点编号。 open_basedir 作为参数传递给启动。这就是为什么在单独的 php.ini 中重写不起作用。至少,当站点为 fast-cgi / su-exec 时,它是这样配置的。
Thank you so much for the answer! I looked everywhere, and the answer was right there on the options screen! Thank you, thank you, thank you!
After further investigation, ISPConfig executes php-cgi when a vhost starts. The starter script is in /var/www/php-fcgi-scripts/web?/.php-fcgi-starter, where the ? represents the site number within the client. The open_basedir is passed as a parameter to the startup. That's why overriding in the individual php.ini doesn't work. At least, that's how it's configured when the site is fast-cgi / su-exec.