0

My project (laravel 5.5 using php 7.0.0)works fine on my localhost. My server uses a global php version of 5.6. I have created a sub-domain (public_html/myproject) for my project. But the php version for my sub-domain, i have upgraded it to php 7. When i run myproject.domain.com i get the error

This page isn’t working myproject.domain.com is currently unable to handle this request. HTTP ERROR 500

I have tried a lot solutions online but none of them seems to work for me. What could i be missing out?

  • Turn on development mode and give us the actual error. – tyteen4a03 Nov 29 '17 at 13:10
  • how do i turn on development mode @tyteen4a03. i have this already in my env `APP_DEBUG=true` –  Nov 29 '17 at 13:10
  • In your `.env` file `APP_DEBUG=true` – Troyer Nov 29 '17 at 13:12
  • @Troyer, i already have that –  Nov 29 '17 at 13:15
  • Does your document root point to `/public`? – common sense Nov 29 '17 at 13:21
  • @Konafets i don't get you right –  Nov 29 '17 at 13:25
  • Laravels entry point is `public/index.php`, The document_root of apache/nginx (depending on your hoster) must point to `public_html/myproject/public`. BTW: `public_html/myproject/` is not a sub-domain, but a subfolder. A subdomain is something like `www`, `stats`, `blog`. However. your domain record must point to `public_html/myproject/public`. – common sense Nov 29 '17 at 13:30
  • @Konafets, yes i am sure it points to the /public. is there any error log that can tell where the problem is coming from? –  Nov 29 '17 at 13:45

1 Answers1

0

Please check your index.php file for the first require statement and make sure that the autoload file is located correctly require_once '../laravel/vendor/autoload.php'; was the right address in my case. My laravel folder was just above my html folder so it worked like this.

Kuldeep
  • 489
  • 6
  • 10