-1

I have successfully used Laravel on my local machine and it worked. But, when I put it on my online cPanel I can access the login page, but any other page behind the login page is producing the error

ERROR 500 - INTERNAL SERVER ERROR

I have checked my online PHP version and it's 7.4.14, while the local version is PHP 7.4.9. I believe that it should not make much difference.

I would be grateful for anything that can helpful.

I've also checked the MySQL version:
cPanel version 5.6.41-84.1
local version 5.7.14

John Conde
  • 217,595
  • 99
  • 455
  • 496
S Mev
  • 327
  • 3
  • 17
  • 2
    You will need to examine the web server's error logs. – Michael Berkowski Feb 06 '21 at 02:42
  • @MichaelBerkowski I went into the error log. it was not producing any output. The last output was several weeks ago – S Mev Feb 06 '21 at 02:43
  • Something could be misconfigured with logging then. At the top of your code in a file include which could cause an error, `error_reporting(E_ALL); ini_set('display_errors', 1);` or consult your hosting company about how to get your error log working – Michael Berkowski Feb 06 '21 at 02:49
  • @MichaelBerkowski I am a little confused which of the files could be modified, to put the codes you gave me. I am thought of putting it inside web.php file. but I am not sure t would produce the report as expected. Thanks – S Mev Feb 06 '21 at 02:57
  • I don't know the framework. You need to choose a file that loads very early, whichever that may be. – Michael Berkowski Feb 06 '21 at 03:00
  • I am using laravel 8 – S Mev Feb 06 '21 at 03:05
  • https://stackoverflow.com/questions/42648990/how-do-i-enable-error-reporting-in-laravel – Michael Berkowski Feb 06 '21 at 04:15

1 Answers1

1

The information shared is not enough to provide a solution. You can try generating the error log first. It looks like the permission for your log file is not set.

Can you try these two command to provide permission on laravel storage folder and bootstrap. Go to the application directory and issue following commands.

chmod 777 -R storage
chmod 777 -R bootstrap/cache
Jaswinder Singh
  • 731
  • 5
  • 20
  • thanks, I discovered that I was running a console output the server that was reason it producing that. – S Mev Feb 08 '21 at 01:55