Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

birdietorerik's avatar

Get 500 error on server

Hi!

Have a app created with laravel 8.x + vue

My application is working fine on my local mac. Using :

php artisan serve

Start my local server, and system working just fine.

But on my server (online) i get 500 error

How to debug this ?

0 likes
5 replies
LaryAI's avatar
Level 58

There are a few steps you can take to debug a 500 error on your server:

  1. Check your server logs: The first step is to check your server logs to see if there are any error messages that can give you a clue as to what's causing the issue. Depending on your server setup, you can usually find your logs in /var/log/apache2/error.log or /var/log/nginx/error.log.

  2. Check your PHP error logs: If you're running PHP, you should also check your PHP error logs to see if there are any errors being thrown by your application. You can usually find your PHP error logs in /var/log/php/error.log.

  3. Enable debug mode: If you're still not sure what's causing the issue, you can try enabling debug mode in Laravel. To do this, open your .env file and set APP_DEBUG=true. This will give you more detailed error messages that can help you pinpoint the issue.

  4. Check your server requirements: Make sure that your server meets the minimum requirements for running Laravel. You can find the requirements in the Laravel documentation.

  5. Check your file permissions: Make sure that your files and directories have the correct permissions. In general, directories should have a permission of 755 and files should have a permission of 644.

  6. Check your .htaccess file: If you're using Apache, make sure that your .htaccess file is configured correctly. You can find more information on configuring your .htaccess file in the Laravel documentation.

If none of these steps help you resolve the issue, you may need to seek further assistance from your hosting provider or a developer with more experience in server administration.

Tray2's avatar
Tray2
Best Answer
Level 73

The easiest way is to start reading the server logs, they should tell you what went wrong. You are probably trying to use something that isn't installed on your host, or you have been developing on Windows, and now moved to a Linux host, and you used the wrong case for a filename somewhere in your code.

In Windows ThisFile and thisFile are the same, while on Linux they are different.

However, start with reading the logs.

birdietorerik's avatar

@Tray2 Hi! Set APP_DEBUG = true Cant find anything in log file

Here is the error when debug = true

ErrorException
Undefined variable: errors (View: /home/forge/app.easyflow.golf/releases/20230520083719/resources/views/auth/passwords/email.blade.php)
dacfabre's avatar

@birdietorerik if new server you might have forgot your .env . if you pull from git, .env is ignored most of the time

Please or to participate in this conversation.