Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP errors shows orange table and 'call stack'

Tags:

php

Recently, if I have PHP errors on my localhost, I'm seeing this layout of an orange table and call stack:

PHP error
(source: doheth.co.uk)

Is this caused by something in particular, a PHP module maybe? Or is it now part of PHP by default? I'd like to go back to the simpler plain message. I'm running PHP on Apache 2 on my Ubuntu desktop.

like image 277
DisgruntledGoat Avatar asked Jan 18 '10 00:01

DisgruntledGoat


People also ask

What is call stack in PHP?

Call stack is very useful when Inspecting the program state. You can see the function calls that are currently on the stack, change the context in which you are debugging to another stack frame on the call stack and inspect the program state in the different frames.

Where are PHP errors displayed?

By default, whenever an error or exception is thrown, PHP sends the error message directly to the user via STDOUT. In a command-line environment, this means that errors are rendered in the terminal. In a web environment, errors and exceptions get displayed directly in the browser.

How do I turn off PHP warnings?

Remember, the PHP ini configuration has an error_reporting directive that will be set by this function during runtime. error_reporting(0); To remove all errors, warnings, parse messages, and notices, the parameter that should be passed to the error_reporting function is zero.


1 Answers

That's the Xdebug output. You can remove the Xdebug library from the extension settings in php.ini and it will show the default PHP stack traces or you can set xdebug.default_enable to Off and it will disable the Xdebug stack traces.

like image 189
Brian McKenna Avatar answered Oct 12 '22 12:10

Brian McKenna