9

I was just glancing through my Cpanel's php.ini EZConfig (basically php.ini; it just allows me to change some settings in php.ini through Cpanel) and noticed track_errors.

Can someone tell me what this means, I have searched the php website and Google and cannot find out what it means exactly?

halfer
  • 19,824
  • 17
  • 99
  • 186
PHPLOVER
  • 7,047
  • 18
  • 37
  • 54

1 Answers1

21

Search for "track_errors PHP".

http://us3.php.net/manual/en/errorfunc.configuration.php#ini.track-errors

If enabled, the last error message will always be present in the variable $php_errormsg.

Matthew
  • 47,584
  • 11
  • 86
  • 98
  • Thanks! I did honestly do a search and found nothing. Thank you – PHPLOVER Sep 05 '10 at 23:16
  • 5
    This feature has been **DEPRECATED** as of PHP 7.2.0. – David Refoua Aug 29 '18 at 07:56
  • @DavidRefoua that is hilarious. I have just found track errors and just thought it could be useful ... and it is gone. Such is life. – BeNice Jul 06 '19 at 15:14
  • @BeNice I see what you mean, but considering there are other (and dare I say even _superior_) features such as [`set_error_handler()`](https://www.php.net/manual/en/function.set-error-handler.php) that can basically track the same thing _safely_, it's no wonder that the PHP team decided `track_errors_ was redundant ¯\_(ツ)_/¯ – David Refoua Jul 06 '19 at 20:04
  • @BeNice BTW, you might want to use [this](https://www.php.net/manual/en/function.error-get-last.php), instead ✌️ – David Refoua Jul 06 '19 at 20:14
  • What is the alternative of this ? i can see that $php_errormsg is used in many files. –  Nov 02 '20 at 08:41
  • More than eleven years into the future, I do search for "track_errors php.ini" – and I find this post. – Daan Wilmer Jan 11 '22 at 16:24