phpconfigurationxdebugini

How to set Stack trace depth of PHP's error log?


In my php.ini I set this line:

error_log = c:/php/php_errors.log

It enables output of errors into the specified file.

However, it always outputs maximum of 4, i.e.:

PHP Fatal error:  Uncaught ServiceNotFoundException
Stack trace:
#0 PluginManager.php(124): AbstractPluginManager->get('getEntityManage...', NULL)
#1 AbstractController.php(301): PluginManager->get('getEntityManage...', NULL)
#2 AbstractController.php(316): AbstractController->plugin('getEntityManage...')
#3 AbstractPluginManager.php on line 133
^^^ stops at depth 4 always

I want to control the stack depth. How? I could not find anything on http://php.net/error-log


Solution

  • The value is^H^H was "log_errors_max_len", in php.ini or possibly configurable via ini_set():

    ini_set("log_errors_max_len",0);
    

    As of PHP8, they no longer allow this (well, you can set it, but PHP ignores it).