【问题标题】:"No input file specified" when using PHP with symlink使用带符号链接的 PHP 时“未指定输入文件”
【发布时间】:2016-02-11 21:20:34
【问题描述】:

我已经用 ISPConfig 建立了一个网站。

在那个网站根目录中我创建了符号链接test/ -> /var/test/

/var/test/ 包含两个文件 - test.php 和 test.html。 test.html 工作正常,但是当我尝试运行 test.php 时,我得到一个带有文本 No input file specified.

的白页

我的网站由运行 Apache 2.2.22 的 ISPConfig 自动配置。这是配置的摘录 - 如果您需要查看更多内容,请询问:

<VirtualHost *:80>
    <Directory /var/www/clients/client1/web2/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
    <FilesMatch "\.ph(p3?|tml)$">
        SetHandler None
    </FilesMatch>
    <Directory /var/www/clients/client1/web2/web>
        AddHandler fcgid-script .php .php3 .php4 .php5
        FCGIWrapper /var/www/php-fcgi-scripts/web2/.php-fcgi-starter .php
        Options +ExecCGI
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>

【问题讨论】:

    标签: php apache symlink


    【解决方案1】:

    通过在.htaccess 顶部设置AddHandler application/x-httpd-php .php 解决

    【讨论】:

      猜你喜欢
      • 2011-09-07
      • 1970-01-01
      • 2014-12-12
      • 1970-01-01
      • 1970-01-01
      • 2021-01-12
      • 2021-11-18
      • 2015-02-12
      • 2015-11-22
      相关资源
      最近更新 更多