Tiago
Tiago

Reputation: 4470

Laravel Internal Server Error 500 on iPage

I created a simple project using Laravel 4.2. It is working fine on my localhost, but I'm getting a 500 Internal Server Error on my web server. I use iPage and it does support php up to 5.5.

I truly have no idea how to debug this, so if you need more information please do advise and I will edit my question to include it.

So far, this is my .htaccess file:

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

    RewriteEngine On
   RewriteBase /

    # Redirect Trailing Slashes...
    # RewriteRule ^(.*)/$ /$1 [L,R=301]

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

EDIT: Error log

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 

How can I go about fixing this problem?

Upvotes: -1

Views: 2714

Answers (1)

mopo922
mopo922

Reputation: 6381

Based on the error you've posted, your web server must be running PHP < 5.4

The line referenced in your error is using the "new" alternate array syntax:

https://github.com/laravel/framework/blob/4.2/src/Illuminate/Support/helpers.php#L426

$results = [];

This was introduced in PHP 5.4:

http://php.net/manual/en/language.types.array.php#example-96

Upvotes: 1

Related Questions