0

I am trying to install latest lumen in my shared hosting. I have created a folder named lumen in public_html and placed all the files in that folder. When I browse the url, for example: https://example.com/lumen it gives me 500 error code.

The same code is running fine in localhost. When I upload it in my shared hosting it stops working. I have added a new .htaccess in the root of lumen folder including this code:

RewriteEngine On
RewriteRule ^(.*)$ public/$1 [L]

Also tried to edit the .htaccess file of public folder as well, and also the index.php, but nothings work.

I couldn't find any appropriate result about this problem. All I can find is about laravel. Can anyone help me with this? The error log of public folder is included:

[25-Oct-2018 06:54:54 UTC] PHP Parse error: syntax error, unexpected '=' in /home2/lilyserv/public_html/lumen/vendor/illuminate/config/Repository.php on line 68

Tushar Monirul
  • 4,944
  • 9
  • 39
  • 49

1 Answers1

0

Are you sure it's lumen 5.4? Because there is nothing on that line here:

https://github.com/laravel/framework/blob/5.4/src/Illuminate/Config/Repository.php#L68

But there is something here: https://github.com/laravel/framework/blob/5.7/src/Illuminate/Config/Repository.php#L68

This is 5.7 version.


What you can do:

  1. Check exactly what Lumen version you have and try to install the propper Lumen 5.4 version.
  2. If you want to have the Lumen 5.7 version(latest) check your PHP version. You need PHP 7+ to run newer versions of Lumen. I think you have PHP 5 or something.
Ionel Lupu
  • 2,695
  • 6
  • 29
  • 53
  • You are right. When I run it in localhost, it shows me this in home page: `Lumen (5.7.2) (Laravel Components 5.7.*)`. So I believe it's 5.7. But I have pointed the latest php in server and it's version 7+. – Tushar Monirul Oct 25 '18 at 07:13
  • as stated here https://lumen.laravel.com/docs/5.7#server-requirements you need at least PHP 7.1. Are you sure you have PHP 7.1+ or it's PHP 7.0? – Ionel Lupu Oct 25 '18 at 09:23