Laravel iPage 上的内部服务器错误 500
Laravel Internal Server Error 500 on iPage
我使用 Laravel 4.2 创建了一个简单的项目。
它在我的本地主机上运行良好,但我的网络服务器上出现 500 Internal Server Error
。我使用 iPage,它支持 php 最高 5.5。
我真的不知道如何调试它,所以如果您需要更多信息,请提出建议,我会编辑我的问题以包含它。
到目前为止,这是我的 .htaccess 文件:
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
RewriteBase /
# Redirect Trailing Slashes...
# RewriteRule ^(.*)/$ / [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
编辑:错误日志
20150130T124355: skwat.lightradius.com/index.php
PHP Parse error: syntax error, unexpected '[' in /hermes/bosoraweb124/b182/ipg.shosanesnaecom/skwat/vendor/laravel/framework/src/Illuminate/Support/helpers.php on line 426
我该如何解决这个问题?
根据您发布的错误,您的网络服务器必须 运行 PHP < 5.4
错误中引用的行使用了 "new" 备用数组语法:
https://github.com/laravel/framework/blob/4.2/src/Illuminate/Support/helpers.php#L426
$results = [];
这是在 PHP 5.4 中引入的:
http://php.net/manual/en/language.types.array.php#example-96
我使用 Laravel 4.2 创建了一个简单的项目。
它在我的本地主机上运行良好,但我的网络服务器上出现 500 Internal Server Error
。我使用 iPage,它支持 php 最高 5.5。
我真的不知道如何调试它,所以如果您需要更多信息,请提出建议,我会编辑我的问题以包含它。
到目前为止,这是我的 .htaccess 文件:
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
RewriteBase /
# Redirect Trailing Slashes...
# RewriteRule ^(.*)/$ / [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
编辑:错误日志
20150130T124355: skwat.lightradius.com/index.php
PHP Parse error: syntax error, unexpected '[' in /hermes/bosoraweb124/b182/ipg.shosanesnaecom/skwat/vendor/laravel/framework/src/Illuminate/Support/helpers.php on line 426
我该如何解决这个问题?
根据您发布的错误,您的网络服务器必须 运行 PHP < 5.4
错误中引用的行使用了 "new" 备用数组语法:
https://github.com/laravel/framework/blob/4.2/src/Illuminate/Support/helpers.php#L426
$results = [];
这是在 PHP 5.4 中引入的:
http://php.net/manual/en/language.types.array.php#example-96