Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

1.6K
Views
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 undefined function Whoops\Exception\xdebug_is_enabled() in /var/www/html/project/vendor/filp/whoops/src/Whoops/Exception/Inspector.php:254

Stack trace:

#0 /var/www/html/project/vendor/filp/whoops/src/Whoops/Exception/Inspector.php(175): Whoops\Exception\Inspector->getTrace()
#1 /var/www/html/project/vendor/filp/whoops/src/Whoops/Handler/PrettyPageHandler.php(280): Whoops\Exception\Inspector->getFrames()
#2 /var/www/html/project/vendor/filp/whoops/src/Whoops/Handler/PrettyPageHandler.php(197): Whoops\Handler\PrettyPageHandler->getExceptionFrames()
#3 /var/www/html/project/vendor/filp/whoops/src/Whoops/Run.php(296): Whoops\Handler\PrettyPageHandler->handle()
#4 /var/www/html/project/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(345): Whoops\Run->handleException()
#5 /var/www/html/project/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(324): Illuminate\Foundation\Exceptions\Handler->renderExceptionWithWhoops()
#6 /var/www/html/project/ in /var/www/html/project/vendor/filp/whoops/src/Whoops/Exception/Inspector.php on line 254

Has anyone seen this error before and know a way to fix it? Thanks beforehand.

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

if you run any version of "filp/whoops" before 2.9, sudo pecl install -f xdebug-2.9.8 to install previous version as xdebug 3 onwards removed the function xdebug_is_enabled. https://xdebug.org/docs/upgrade_guide

Then add "zend_extension=/usr/lib/php/20190902/xdebug.so" to php.ini

"filp/whoops": "^2.9" should be able to support xdebug 3 as it check whether xdebug_is_enabled exists, as 2.9.1 is checking for the xdebug_is_enabled function https://github.com/filp/whoops/compare/2.9.0...2.9.1 https://github.com/filp/whoops/commit/dc30a4cb68b45a5fb65e190cf0a6b58d3d3ef096

If you already added zend_extension=/usr/lib/php/20190902/xdebug.so" to php.ini, please remove it before installing xdebug-2.9.8 as it will cause error in installation

Also dont just change the version of your package in composer.lock, it will not actually change the package version as the file download link is it in composer.lock as well.

over 4 years ago · Santiago Trujillo Report

0

turns out I was facing this issue and found out that just by updating "filp/whoops": "^2.0" to "filp/whoops": "^2.9" the problem was solved.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!