Questions tagged [whoops]

A PHP library for better dealing with errors and exceptions

whoops is a nice little library that helps you develop and maintain your projects better, by helping you deal with errors and exceptions in a less painful way.

Site : http://filp.github.io/whoops/

Demo : http://filp.github.io/whoops/demo

Download: https://github.com/filp/whoops/tags

Docs: https://github.com/filp/whoops/wiki/API-Documentation

Features

  • Includes providers for Silex and Zend Framework 2, with community-provided support for other platforms and frameworks
  • Now included in the Laravel 4 core!
  • Detailed & intuitive page for errors and exceptions (PrettyPageHandler)
  • Code view for all frames in a stack trace with line highlights (PrettyPageHandler)
  • Frame comments & analysis through custom middle-ware/handlers (PrettyPageHandler)
  • Request & app-specific information through custom middle-ware/handlers (PrettyPageHandler)
  • JSON & AJAX support (JsonResponseHandler)
  • XML & SOAP support (XmlResponsehandler, SoapResponseHandler)
  • Clean and tested code-base that's easy to extend and build on to make it work just right for your project
32 questions
75
votes
12 answers

How to hide .env passwords in Laravel whoops output?

How can I hide my passwords and other sensitive environment variables on-screen in Laravel's whoops output? Sometimes other people are looking at my development work. I don't want them to see these secrets if an exception is thrown, but I also don't…
Jeff Puckett
  • 37,464
  • 17
  • 118
  • 167
15
votes
2 answers

PHP Fatal error: Uncaught Error: Call to undefined function Whoops\Exception\xdebug_is_enabled() with Laravel 5.8 and PHP 7.4

hope you're doing great, I'm working on a Laravel project I didn't work on since a couple of months, and found that anytime an exception is raised, I get the following error: [Fri Jan 15 15:51:11 2021] PHP Fatal error: Uncaught Error: Call to…
d3vCr0w
  • 602
  • 1
  • 5
  • 11
11
votes
2 answers

Save the result of Whoops PrettyPageHandler

I'm using the Whoops error library (and loving it) on dev to show the PrettyPageHandler like so: if (ENVIRONMENT == 'local') { $whoops = new \Whoops\Run; $whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler); …
twigg
  • 3,753
  • 13
  • 54
  • 96
6
votes
1 answer

How to Install Whoops in Laravel 6 and Above Versions

I have been Working on the Laravel Framework Since 5.4 Here is the History of Laravel Versions And Error Handlers 4.0 - 4.2 - filp/whoops 5.0 - 5.4 - symfony/error-handler 5.5 - 5.8 - filp/whoops And By the Relese of Laravel 6.0 they have…
ManojKiran A
  • 5,896
  • 4
  • 30
  • 43
5
votes
2 answers

Homestead 502 Bad Gateway instead of Whoops for PHP errors

My Homestead Vagrant virtual machine is returning me a 502 Bad Gateway instead of a Laravel Whoops error for some PHP errors (like class not found, some kind of parse errors etc ...). Does someone have the solution for briging Whoops for all PHP…
Ifnot
  • 4,914
  • 4
  • 33
  • 47
3
votes
1 answer

How do I disable filp/whoops package in Laravel 5.5 without removing it?

Laravel 5.5 app. Originally 5.3. I installed the filp/whoops package as per the upgrade guide, but now I want to disable it, as I believe it is causing "out of memory" errors on my Homestead machine whenever I encounter an error, which is really…
fronzee
  • 1,668
  • 2
  • 21
  • 32
3
votes
1 answer

Capture or modify Laravel's error pages?

I'd like to insert a code snippet into Laravel's error pages, but I can't figure out how to modify or capture the output. This filthy hack seems to work, but the snippet is inserted before any page code. // In…
joemaller
  • 19,579
  • 7
  • 67
  • 84
2
votes
1 answer

Codeigniter + Whoops

I'm trying to setup Whoops on a Codeigniter 3 application. I installed Whoops with composer and calling it like this : use Whoops\Handler\PrettyPageHandler; if (ENVIRONMENT == 'development') { $whoops = new \Whoops\Run; …
Pierre
  • 4,976
  • 12
  • 54
  • 76
2
votes
1 answer

PHP Whoops error handle clear buffer

Issue In procedural scripting the PHP Whoops Pretty Page handler content will be mixed with partial content from the applications buffer output. Whoops can appear scrambled or output inside a hidden html tag. Question How to clear the previous…
Marc
  • 5,109
  • 2
  • 32
  • 41
2
votes
1 answer

upgrade fipl/whoops 2.* in laravel 4.2.*

I using laravel 4.2.19 with php7 then have problem with Exception, I search and see problem in php7 remove Exception class and fipl/whoops 1.* then not working but upgrade to version 2.* then will working with php7. images error when require…
2
votes
1 answer

PHP Whoops Error Handler email

I am currently coding pages that will be executed by cronjobs so no real users will have access to them. In development I am using Whoops to debug my errors/exceptions. I am not using Laravel any another framework. When I commit my code to the…
itsliamoco
  • 1,028
  • 1
  • 12
  • 28
2
votes
1 answer

Add arguments to Whoops stack frames

This might be a stupid question but I can't really see it in the documentation: is there a config variable (ideally) or an unobtrusive way to add a callback into Whoops (specifically the PrettyPageHandler) so that each frame has its arguments in the…
alexrussell
  • 13,856
  • 5
  • 38
  • 49
1
vote
1 answer

Using monolog and whoops

I am trying to using Monolog in the set_exception_handler and set_error_handler, while Whoops outside. I tried 2 locations for running Whoops. Run Whoops #1 Location Result: Monolog logs the error/exception and Whoops doesn't display Run Whoops…
1
vote
1 answer

Why does Whoops look different on my Laravel sometime?

I am playing with a non-standard Laravel application that I have built without the template (laravel new). I am quite new to this framework but I noticed that Whoops can take different shapes: A minimal version: The standard Whoops skin: Or the…
nowox
  • 25,978
  • 39
  • 143
  • 293
1
vote
1 answer

CodeIgniter 3 with Whoops

I can't get this working to any error occurred in CI entirely, Whoops registered as early as possible by adding handlers to index.php. switch (ENVIRONMENT) { case 'development': error_reporting(-1); ini_set('display_errors', 1); …
Adam
  • 99
  • 2
  • 13
1
2 3