【问题标题】:"No input file specified." after installing Roundcube“没有指定输入文件。”安装 Roundcube 后
【发布时间】:2015-06-30 15:29:45
【问题描述】:

在安装 apache、php 和 phpmyadmin 之后,我正在配置一个新的 vps (Debian 7)。我现在正在尝试安装 roundcube,但在尝试在线访问它时,我得到一个带有消息 "No input file specified." 的空白页。

我在日志中收到以下错误:

mod_fcgid: stderr: PHP Warning:  Unknown: failed to open stream: Operation not permitted in Unknown on line 0
mod_fcgid: stderr: PHP Warning:  Unknown: open_basedir restriction in effect. File(/usr/share/roundcube/index.php) is not within the allowed path(s): (/var/www/clients/client0/web1/web:/var/www/clients/client0/web1/private:/var/www/clients/client0/web1/tmp:/var/www/site.com/web:/srv/www/site.com/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin) in Unknown on line 0

我尝试在 php.ini 和 apache 的 conf 文件中禁用 open_basedir,但我仍然收到此错误(我重新启动了 apache)。也许 open_basedir 不是问题;权限,符号链接?


apache.conf:
# Those aliases do not work properly with several hosts on your apache server
# Uncomment them to use it or adapt them to your configuration
#    Alias /roundcube/program/js/tiny_mce/ /usr/share/tinymce/www/
#    Alias /roundcube /var/lib/roundcube

Alias /interfacewebmail /var/lib/roundcube

# Access to tinymce files
<Directory "/usr/share/tinymce/www/">
      Options Indexes MultiViews FollowSymLinks
      AllowOverride None
      Order allow,deny
      allow from all
</Directory>

<Directory /var/lib/roundcube/>
    Options +FollowSymLinks
    php_admin_value open_basedir none
    DirectoryIndex index.php

    <FilesMatch "\.php[345]?$">
    SetHandler fcgid-script
    </FilesMatch>

    FCGIWrapper /var/www/php-fcgi-scripts/web1/.php-fcgi-starter .php
    FCGIWrapper /var/www/php-fcgi-scripts/web1/.php-fcgi-starter .php3
    FCGIWrapper /var/www/php-fcgi-scripts/web1/.php-fcgi-starter .php4
    FCGIWrapper /var/www/php-fcgi-scripts/web1/.php-fcgi-starter .php5
    Options +ExecCGI

  # This is needed to parse /var/lib/roundcube/.htaccess. See its
  # content before setting AllowOverride to None.
  AllowOverride All
  order allow,deny
  allow from all
</Directory>

# Protecting basic directories:
<Directory /var/lib/roundcube/config>
        Options -FollowSymLinks
        AllowOverride None
</Directory>

<Directory /var/lib/roundcube/temp>
        Options -FollowSymLinks
        AllowOverride None
    Order allow,deny
    Deny from all
</Directory>

<Directory /var/lib/roundcube/logs>
        Options -FollowSymLinks
        AllowOverride None
    Order allow,deny
    Deny from all
</Directory>

【问题讨论】:

    标签: php linux apache debian roundcube


    【解决方案1】:

    提示在错误信息中

    mod_fcgid: stderr: PHP Warning:  Unknown: open_basedir restriction in effect. 
    
    File(/usr/share/roundcube/index.php) is not within the allowed path(s):
    

    所以你需要做的就是将圆形立方体路径添加到“允许”路径中

    查看此内容以了解如何做到这一点PHP open_basedir broken in Apache but works in PHP at runtime

    乐: 如果您更改此设置会有所帮助

    php_admin_value open_basedir none
    

    进入

    php_admin_value open_basedir "/usr/share/roundcube/"
    

    【讨论】:

    • 它不起作用,所以我决定为 Horde 切换 roundcube 并得到“内部服务器错误”而不是“未指定输入文件。”。我通过在 www-data UID 上编辑 suphp.conf 中的 min_uid 解决了这个问题,现在它可以工作了。
    猜你喜欢
    • 1970-01-01
    • 2011-09-01
    • 2018-02-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多