【问题标题】:No input file specified. CPANEL/PHP未指定输入文件。面板/PHP
【发布时间】:2021-11-18 04:04:36
【问题描述】:

我的 Laravel 应用程序已在我的 Cpanel 上运行了 3 年多。 今天当你访问我的网站时它开始抛出错误No input file specified.

我将相同的代码移动到子域 text.lamxxx.com 并且它工作正常。 但在我的主域上仍然抛出No input file specified. 我已经排除故障超过 24 小时。我检查了服务器日志,检查 laravel 日志等。但网站仍然关闭。

下面是我的 .htacces

    <IfModule mod_negotiation.c>
        Options -MultiViews -Indexes
    </IfModule>

    RewriteEngine On

    # Handle Authorization Header
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    # Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} (.+)/$
    RewriteRule ^ %1 [L,R=301]

    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php73” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php73 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit``` 

【问题讨论】:

  • 我使用 index.html 并且网站打开了它....但是当我尝试打开 .php 脚本时它显示错误。

标签: php laravel .htaccess laravel-5 cpanel


【解决方案1】:

我认为您的问题是由于 PHP 版本升级

  • 尝试按照上一篇文章No input file specified中的说明修改您的 .htacces

  • 如果问题仍然存在,请尝试恢复到以前的 PHP 版本。

【讨论】:

    【解决方案2】:

    请尝试从 Cpanel 更改 PHP 版本,然后检查。我可能请更改为 php 5.6 并检查。

    【讨论】:

      猜你喜欢
      • 2014-12-12
      • 1970-01-01
      • 2015-02-12
      • 2015-11-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-01-11
      相关资源
      最近更新 更多