Lal Kumar Rai
Lal Kumar Rai

Reputation: 343

laravel 5.2 showing 500 errors

I have modified a laravel system which works fine in localhost. But when i put it in live server, it gives 500 errors enter image description here

my .env file is given below

 APP_ENV=local
 APP_DEBUG=false
 APP_KEY=636MdJTzWw6ZgHIQXTFMGattFtXVm75v

 DB_HOST=localhost
 DB_DATABASE=*****
 DB_USERNAME=*****
 DB_PASSWORD=Snl,4}38yZ$i

 CACHE_DRIVER=file
 SESSION_DRIVER=file
 QUEUE_DRIVER=sync

 MAIL_DRIVER=smtp
 MAIL_HOST=mailtrap.io
 MAIL_PORT=2525
 MAIL_USERNAME=null
 MAIL_PASSWORD=null
 MAIL_ENCRYPTION=null

my .htaccess file is here

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

RewriteEngine On

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

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

and my public/index.php file is here

 require __DIR__.'/../bootstrap/autoload.php';
 $app = require_once __DIR__.'/../bootstrap/app.php';



 $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);

$response = $kernel->handle(
$request = Illuminate\Http\Request::capture()
);

 $response->send();

 $kernel->terminate($request, $response);

Guys hoping for a positive response... updates: I have looked in the error_log file and it show errors

[17-Apr-2016 07:45:28 Etc/GMT] PHP Parse error:  syntax error, unexpected   'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /home/web/public_html/attendance/public/index.php on line 50

Upvotes: 0

Views: 1536

Answers (1)

Denis Mysenko
Denis Mysenko

Reputation: 6534

Based on the error message, I suspect that your PHP version is lower than 5.5.

An excerpt from PHP documentation:

::class

Since PHP 5.5, the class keyword is also used for class name resolution. You can get a string containing the fully qualified name of the ClassName class by using ClassName::class. This is particularly useful with namespaced classes.

Laravel needs PHP 5.5.9 or newer

Upvotes: 4

Related Questions