我正在使用cPanel为我的网站上传一个简单的订阅页面。我将文件上传到public_html,从public文件夹中移动文件并修改index.php以便它指向应用程序。我使用的PHP版本是7.3,但由于那是最新的版本,我不得不在主机上选择7.2版本。
当我加载我的网站时,出现以下错误:“此页面无法处理请求。 HTTP ERROR 500”
当我从index.php文件中删除所有内容并添加一个简单的echo语句后,页面就可以加载了。
我真的需要帮助,以下是错误日志:
堆栈跟踪:
#0 /home3/bazzaar/public_html/vendor/symfony/http-foundation/Response.php(198): Symfony\Component\HttpFoundation\Response->setStatusCode(500)
#1 /home3/bazzaar/public_html/vendor/symfony/http-foundation/Response.php(214): Symfony\Component\HttpFoundation\Response->__construct('<!doctype html>...', 500, Array)
#2 /home3/bazzaar/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(328): Symfony\Component\HttpFoundation\Response::create('<!doctype html>...', 500, Array)
#3 /home3/bazzaar/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(305): Illuminate\Foundation\Exceptions\Handler->convertExceptionToResponse(Object(Symfony\Component\Er in /home3/bazzaar/public_html/vendor/symfony/http-foundation/Response.php on line 450
我的.htacess文件
suPHP_ConfigPath /opt/php72/lib
选项 -MultiViews -Indexes
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]
# Send Requests To Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
使用PHP72作为默认版本