1

I developed a simple application in laravel (5.6) everything works fine on my PC (windows 10/ Xamp / PHP 7.1). but when i upload the same project to a VPS running Cent OS it gives

with PHP 5.6 (which is expected)

Parse error: syntax error, unexpected '?' in /home/clarionit/public_html/ambience/c/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php on line 233

with PHP 7.0 / 7.1 / 7.2

500, Internal server error.

What I have done so far?

  • Permissions for all files and folders are set to 777 (to see if that is a problem)
  • Replacing index.php code with something simpler like phpinfo() works perfectly.

Ask for any more information needed, Please tell me what can be causing the 500, internal server error.

Abdulla Nilam
  • 36,589
  • 17
  • 64
  • 85
Prakhar Thakur
  • 1,209
  • 3
  • 13
  • 38

1 Answers1

5

Laravel 5.6 requirement should be installed in system

  • PHP >= 7.1.3
  • OpenSSL PHP Extension
  • PDO PHP Extension
  • Mbstring PHP Extension
  • Tokenizer PHP Extension
  • XML PHP Extension
  • Ctype PHP Extension
  • JSON PHP Extension

Once run these commands, I hope your problem will resolve.

rm -rf vendor
rm -rf storage/framework/cache/*
rm -rf storage/framework/session/*
rm -rf storage/framework/views/*
rm composer.lock
composer clear-cache
composer install
Sateesh
  • 1,327
  • 9
  • 12