Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 683 Vote(s) - 3.57 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to debug Laravel error 500 with no logs, no information

#1
I'm working on an existing Laravel application in order to develop new feature but after installing the app on my computer, I have an error 500 and no clue to resolve it.

In my app.php file I have set :

'env' => env('APP_ENV', 'local'),
'debug' => env('APP_DEBUG', true),

But still I have no information, no logs are generated in `storage/logs` . I have no idea of what could be the problem.

The previous developer was on windows and I'm working on Linux but I'm not sure this is revelant.


EDIT:

I also have those variable in my config/app.php

'log' => env('APP_LOG', 'daily'),
'log_level' => env('APP_LOG_LEVEL', 'debug'),
Reply

#2
Next to looking into your `.env` file, make sure permissions are correctly set (and good practice to create the `storage/logs` folder(s) manually - at least on windows that causes problems).
Reply

#3
Some PHP exceptions are not possible to catch, so Laravel cant handle them. For example syntax errors, or maximum memory limit errors.

> The following error types cannot be handled with a user defined
> function: E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING,
> E_COMPILE_ERROR, E_COMPILE_WARNING, and most of E_STRICT raised in the
> file where set_error_handler() is called.

Ref.:

[To see links please register here]

Reply

#4
I tried to everything to find out the issue like enabling error reporting to report all like :

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

Also i tried to add my custom error handler as well but nothing worked for me. So finally i found the actual issue in php error log file in apache error logs folder (`Applications/MAMP/logs` as am using Mac).
Reply

#5
Check your .htaccess file in your public folder! - This hot-fix is host dependent!!!

Change line from:

RewriteRule ^ index.php [L]

To:

RewriteRule ^ /index.php [L]
Reply

#6
I had simiar issue (saw error 500, but logs were present).

In order to be able to see errors directly on the page, I did following changes:
1) enable debug mode: `APP_DEBUG=true`
2) reload configuration: `php artisan config:cache`

Reply

#7
If you still getting same after trying all of the above solutions, same was here !!. Finally found solution using apache log.

Check apache log by

tail -f /usr/local/apache/logs/error_log

If you can see something like '...index.php is writable by group'. then change permission

chmod 0644 public/index.php
Reply

#8
I had this issue, and setting debug on told me the true issue.

For me, it was permission related, the running process didn't have permission to write to the log files, very hard to debug when the files you are relying on to tell you the problem don't arrow write!
Reply

#9
I had the same issue. Apparently an error came through that was not an exception at all. This did get me pointed in the right direction though

in `app/Exceptions/Handler.php`:
```
public function report($e)
{
dd($e);

...
}


```
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through