尽pipe添加了正确的条目,但却获得了“有效的open_basedir限制”

我正在尝试使用php的open_basedir选项创build一个共享的宿主场景。 我正在通过将以下内容添加到apache2.conf来完成此操作

<VirtualHost *:80> ServerName lt1.example.net DocumentRoot /home/akshat/example/tmpblogs/tb1/ php_admin_value open_basedir /home/akshat/example/tmpblogs/tb1/ </VirtualHost> <VirtualHost *:80> ServerName lt2.example.net DocumentRoot /home/akshat/example/tmpblogs/tb2/ php_admin_flag open_basedir /home/akshat/example/tmpblogs/tb2/ </VirtualHost> 

现在当我访问lt2.example.net时,我得到错误:

警告:未知:有效的open_basedir限制。 文件(/home/akshat/example/tmpblogs/tb2/index.php)不在允许的path中:(0)在第0行的未知

警告:未知:无法打开stream:在第0行未知的操作不允许

致命错误:未知:未能打开所需的'/home/akshat/example/tmpblogs/tb2/index.php'(include_path ='。:/ usr / share / php:/ usr / share / pear')

我在访问“lt1.example.net”的时候也遇到了同样的错误,但后来它突然变得没事了。

我在这里做错了什么?

发现了错误。 这是一个愚蠢的。

在站点2我使用“php_admin_flag”指令而不是“php_admin_value”。 问题解决了