Turning on developer mode causes fatal errors

On 8.2 While trying to troubleshoot another issue (8.2 Report undefined field headers) I turned on developer mode and stack traces. This immediately caused every page to return a 500 error.

[2023-03-27 00:45:06] php.CRITICAL: Uncaught Error: Too few arguments to function StackTraceErrorHandler(), 4 passed and exactly 5 expected {"exception":"[object] (ArgumentCountError(code: 0): Too few arguments to function StackTraceErrorHandler(), 4 passed and exactly 5 expected at /home/rs/public_html/public/legacy/include/utils.php:3888)"} []
[2023-03-27 00:45:06] request.CRITICAL: Uncaught PHP Exception ArgumentCountError: "Too few arguments to function StackTraceErrorHandler(), 4 passed and exactly 5 expected" at /home/rs/public_html/public/legacy/include/utils.php line 3888 {"exception":"[object] (ArgumentCountError(code: 0): Too few arguments to function StackTraceErrorHandler(), 4 passed and exactly 5 expected at /home/rs/public_html/public/legacy/include/utils.php:3888)"} []
[2023-03-27 00:45:06] request.CRITICAL: Exception thrown when handling an exception (LogicException: Cannot change the name of an active session. at /home/rs/public_html/vendor/symfony/http-foundation/Session/Storage/Proxy/AbstractProxy.php line 113) {"exception":"[object] (LogicException(code: 0): Cannot change the name of an active session. at /home/rs/public_html/vendor/symfony/http-foundation/Session/Storage/Proxy/AbstractProxy.php:113)"} []
[2023-03-27 00:45:06] php.CRITICAL: Uncaught Exception: Cannot change the name of an active session. {"exception":"[object] (LogicException(code: 0): Cannot change the name of an active session. at /home/rs/public_html/vendor/symfony/http-foundation/Session/Storage/Proxy/AbstractProxy.php:113, ArgumentCountError(code: 0): Too few arguments to function StackTraceErrorHandler(), 4 passed and exactly 5 expected at /home/rs/public_html/public/legacy/include/utils.php:3888)"} []

I now can’t turn it back as I can’t get to the page…

I was able to turn this off by altering the values in config_override.php. But it would be nice to be able to use developer mode.

You can go to that StackTraceErrorHandler function in include/utils.php and change the function header to this:

function StackTraceErrorHandler($errno, $errstr, $errfile, $errline, $errcontext = null)

Tell me if it fixes the problem, please

Unfortunately this didn’t fix it. The page where I’d just turned on dev mode showed ‘Unexpected error while calling action’ and kept loading indefinitely, and trying to load the home page gave other errors:

[Notice] SessionHandler::gc(): ps_files_cleanup_dir: opendir(/var/cpanel/php/sessions/ea-php80) failed: Permission denied (13) occurred in /home/rs2023/public_html/vendor/symfony/http-foundation/Session/Storage/Handler/StrictSessionHandler.php on line 106 [2023-03-27 20:05:29] display_stack_trace caller, file: /home/rs2023/public_html/public/legacy/include/utils.php line#: 3945
[L:](:StackTraceErrorHandler)
/home/rs2023/public_html/vendor/symfony/http-foundation/Session/Storage/Handler/StrictSessionHandler.php[L:106](SessionHandler:gc)
/home/rs2023/public_html/vendor/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php[L:89](Symfony\Component\HttpFoundation\Session\Storage\Handler\StrictSessionHandler:gc)
[L:](Symfony\Component\HttpFoundation\Session\Storage\Proxy\SessionHandlerProxy:gc)
/home/rs2023/public_html/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php[L:156](:session_start)
/home/rs2023/public_html/vendor/symfony/http-foundation/Session/Session.php[L:59](Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage:start)
/home/rs2023/public_html/core/backend/Engine/LegacyHandler/LegacyHandler.php[L:308](Symfony\Component\HttpFoundation\Session\Session:start)
/home/rs2023/public_html/core/backend/Engine/LegacyHandler/LegacyHandler.php[L:272](App\Engine\LegacyHandler\LegacyHandler:startSymfonySession)
/home/rs2023/public_html/core/backend/Module/LegacyHandler/ModuleNameMapperHandler.php[L:149](App\Engine\LegacyHandler\LegacyHandler:close)
/home/rs2023/public_html/core/backend/SystemConfig/LegacyHandler/SystemConfigHandler.php[L:146](App\Module\LegacyHandler\ModuleNameMapperHandler:getLegacyToFrontendMap)
/home/rs2023/public_html/cache/prod/Container9rpeNPx/App_KernelProdContainer.php[L:624](App\SystemConfig\LegacyHandler\SystemConfigHandler:__construct)
/home/rs2023/public_html/cache/prod/Container9rpeNPx/App_KernelProdContainer.php[L:1076](Container9rpeNPx\App_KernelProdContainer:getApp_SystemconfigsService)
/home/rs2023/public_html/cache/prod/Container9rpeNPx/App_KernelProdContainer.php[L:1066](Container9rpeNPx\App_KernelProdContainer:getUserHandlerService)
/home/rs2023/public_html/cache/prod/Container9rpeNPx/App_KernelProdContainer.php[L:1239](Container9rpeNPx\App_KernelProdContainer:getAuthenticationService)
/home/rs2023/public_html/cache/prod/Container9rpeNPx/App_KernelProdContainer.php[L:761](Container9rpeNPx\App_KernelProdContainer:getLegacySessionDenyAccessListenerService)
/home/rs2023/public_html/vendor/symfony/event-dispatcher/EventDispatcher.php[L:267](Container9rpeNPx\App_KernelProdContainer:Container9rpeNPx\{closure})
/home/rs2023/public_html/vendor/symfony/event-dispatcher/EventDispatcher.php[L:230](Symfony\Component\EventDispatcher\EventDispatcher:Symfony\Component\EventDispatcher\{closure})
/home/rs2023/public_html/vendor/symfony/event-dispatcher/EventDispatcher.php[L:59](Symfony\Component\EventDispatcher\EventDispatcher:callListeners)
/home/rs2023/public_html/vendor/symfony/http-kernel/HttpKernel.php[L:133](Symfony\Component\EventDispatcher\EventDispatcher:dispatch)
/home/rs2023/public_html/vendor/symfony/http-kernel/HttpKernel.php[L:79](Symfony\Component\HttpKernel\HttpKernel:handleRaw)
/home/rs2023/public_html/vendor/symfony/http-kernel/Kernel.php[L:195](Symfony\Component\HttpKernel\HttpKernel:handle)
/home/rs2023/public_html/public/index.php[L:62](Symfony\Component\HttpKernel\Kernel:handle)
[Warning] session_start(): Session cache limiter cannot be sent after headers have already been sent (output started at /home/rs2023/public_html/public/legacy/include/utils.php:3944) occurred in /home/rs2023/public_html/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php on line 156 [2023-03-27 20:05:29] display_stack_trace caller, file: /home/rs2023/public_html/public/legacy/include/utils.php line#: 3945
[L:](:StackTraceErrorHandler)
/home/rs2023/public_html/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php[L:156](:session_start)
/home/rs2023/public_html/vendor/symfony/http-foundation/Session/Session.php[L:59](Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage:start)
/home/rs2023/public_html/core/backend/Engine/LegacyHandler/LegacyHandler.php[L:308](Symfony\Component\HttpFoundation\Session\Session:start)
/home/rs2023/public_html/core/backend/Engine/LegacyHandler/LegacyHandler.php[L:272](App\Engine\LegacyHandler\LegacyHandler:startSymfonySession)
/home/rs2023/public_html/core/backend/Module/LegacyHandler/ModuleNameMapperHandler.php[L:149](App\Engine\LegacyHandler\LegacyHandler:close)
/home/rs2023/public_html/core/backend/SystemConfig/LegacyHandler/SystemConfigHandler.php[L:146](App\Module\LegacyHandler\ModuleNameMapperHandler:getLegacyToFrontendMap)
/home/rs2023/public_html/cache/prod/Container9rpeNPx/App_KernelProdContainer.php[L:624](App\SystemConfig\LegacyHandler\SystemConfigHandler:__construct)
/home/rs2023/public_html/cache/prod/Container9rpeNPx/App_KernelProdContainer.php[L:1076](Container9rpeNPx\App_KernelProdContainer:getApp_SystemconfigsService)
/home/rs2023/public_html/cache/prod/Container9rpeNPx/App_KernelProdContainer.php[L:1066](Container9rpeNPx\App_KernelProdContainer:getUserHandlerService)
/home/rs2023/public_html/cache/prod/Container9rpeNPx/App_KernelProdContainer.php[L:1239](Container9rpeNPx\App_KernelProdContainer:getAuthenticationService)
/home/rs2023/public_html/cache/prod/Container9rpeNPx/App_KernelProdContainer.php[L:761](Container9rpeNPx\App_KernelProdContainer:getLegacySessionDenyAccessListenerService)
/home/rs2023/public_html/vendor/symfony/event-dispatcher/EventDispatcher.php[L:267](Container9rpeNPx\App_KernelProdContainer:Container9rpeNPx\{closure})
/home/rs2023/public_html/vendor/symfony/event-dispatcher/EventDispatcher.php[L:230](Symfony\Component\EventDispatcher\EventDispatcher:Symfony\Component\EventDispatcher\{closure})
/home/rs2023/public_html/vendor/symfony/event-dispatcher/EventDispatcher.php[L:59](Symfony\Component\EventDispatcher\EventDispatcher:callListeners)
/home/rs2023/public_html/vendor/symfony/http-kernel/HttpKernel.php[L:133](Symfony\Component\EventDispatcher\EventDispatcher:dispatch)
/home/rs2023/public_html/vendor/symfony/http-kernel/HttpKernel.php[L:79](Symfony\Component\HttpKernel\HttpKernel:handleRaw)
/home/rs2023/public_html/vendor/symfony/http-kernel/Kernel.php[L:195](Symfony\Component\HttpKernel\HttpKernel:handle)
/home/rs2023/public_html/public/index.php[L:62](Symfony\Component\HttpKernel\Kernel:handle)
[Warning] session_name(): Session name cannot be changed after headers have already been sent occurred in /home/rs2023/public_html/vendor/symfony/http-foundation/Session/Storage/Proxy/AbstractProxy.php on line 116 [2023-03-27 20:05:29] display_stack_trace caller, file: /home/rs2023/public_html/public/legacy/include/utils.php line#: 3945
[L:](:StackTraceErrorHandler)
/home/rs2023/public_html/vendor/symfony/http-foundation/Session/Storage/Proxy/AbstractProxy.php[L:116](:session_name)
/home/rs2023/public_html/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php[L:201](Symfony\Component\HttpFoundation\Session\Storage\Proxy\AbstractProxy:setName)
/home/rs2023/public_html/vendor/symfony/http-foundation/Session/Session.php[L:228](Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage:setName)
/home/rs2023/public_html/core/backend/Engine/LegacyHandler/LegacyHandler.php[L:302](Symfony\Component\HttpFoundation\Session\Session:setName)
/home/rs2023/public_html/core/backend/Engine/LegacyHandler/LegacyHandler.php[L:272](App\Engine\LegacyHandler\LegacyHandler:startSymfonySession)
/home/rs2023/public_html/core/backend/Module/LegacyHandler/ModuleNameMapperHandler.php[L:149](App\Engine\LegacyHandler\LegacyHandler:close)
/home/rs2023/public_html/core/backend/SystemConfig/LegacyHandler/SystemConfigHandler.php[L:146](App\Module\LegacyHandler\ModuleNameMapperHandler:getLegacyToFrontendMap)
/home/rs2023/public_html/cache/prod/Container9rpeNPx/App_KernelProdContainer.php[L:624](App\SystemConfig\LegacyHandler\SystemConfigHandler:__construct)
/home/rs2023/public_html/cache/prod/Container9rpeNPx/App_KernelProdContainer.php[L:1076](Container9rpeNPx\App_KernelProdContainer:getApp_SystemconfigsService)
/home/rs2023/public_html/cache/prod/Container9rpeNPx/App_KernelProdContainer.php[L:1066](Container9rpeNPx\App_KernelProdContainer:getUserHandlerService)
/home/rs2023/public_html/cache/prod/Container9rpeNPx/App_KernelProdContainer.php[L:1239](Container9rpeNPx\App_KernelProdContainer:getAuthenticationService)
/home/rs2023/public_html/cache/prod/Container9rpeNPx/App_KernelProdContainer.php[L:761](Container9rpeNPx\App_KernelProdContainer:getLegacySessionDenyAccessListenerService)
/home/rs2023/public_html/vendor/symfony/event-dispatcher/EventDispatcher.php[L:267](Container9rpeNPx\App_KernelProdContainer:Container9rpeNPx\{closure})
/home/rs2023/public_html/vendor/symfony/event-dispatcher/EventDispatcher.php[L:230](Symfony\Component\EventDispatcher\EventDispatcher:Symfony\Component\EventDispatcher\{closure})
/home/rs2023/public_html/vendor/symfony/event-dispatcher/EventDispatcher.php[L:59](Symfony\Component\EventDispatcher\EventDispatcher:callListeners)
/home/rs2023/public_html/vendor/symfony/http-kernel/HttpKernel.php[L:133](Symfony\Component\EventDispatcher\EventDispatcher:dispatch)
/home/rs2023/public_html/vendor/symfony/http-kernel/HttpKernel.php[L:79](Symfony\Component\HttpKernel\HttpKernel:handleRaw)
/home/rs2023/public_html/vendor/symfony/http-kernel/EventListener/ErrorListener.php[L:60](Symfony\Component\HttpKernel\HttpKernel:handle)
/home/rs2023/public_html/vendor/symfony/event-dispatcher/EventDispatcher.php[L:270](Symfony\Component\HttpKernel\EventListener\ErrorListener:onKernelException)
/home/rs2023/public_html/vendor/symfony/event-dispatcher/EventDispatcher.php[L:230](Symfony\Component\EventDispatcher\EventDispatcher:Symfony\Component\EventDispatcher\{closure})
/home/rs2023/public_html/vendor/symfony/event-dispatcher/EventDispatcher.php[L:59](Symfony\Component\EventDispatcher\EventDispatcher:callListeners)
/home/rs2023/public_html/vendor/symfony/http-kernel/HttpKernel.php[L:218](Symfony\Component\EventDispatcher\EventDispatcher:dispatch)
/home/rs2023/public_html/vendor/symfony/http-kernel/HttpKernel.php[L:90](Symfony\Component\HttpKernel\HttpKernel:handleThrowable)
/home/rs2023/public_html/vendor/symfony/http-kernel/Kernel.php[L:195](Symfony\Component\HttpKernel\HttpKernel:handle)
/home/rs2023/public_html/public/index.php[L:62](Symfony\Component\HttpKernel\Kernel:handle)
[Warning] session_id(): Session ID cannot be changed after headers have already been sent occurred in /home/rs2023/public_html/vendor/symfony/http-foundation/Session/Storage/Proxy/AbstractProxy.php on line 92 [2023-03-27 20:05:29] display_stack_trace caller, file: /home/rs2023/public_html/public/legacy/include/utils.php line#: 3945
[L:](:StackTraceErrorHandler)
/home/rs2023/public_html/vendor/symfony/http-foundation/Session/Storage/Proxy/AbstractProxy.php[L:92](:session_id)
/home/rs2023/public_html/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php[L:185](Symfony\Component\HttpFoundation\Session\Storage\Proxy\AbstractProxy:setId)
/home/rs2023/public_html/vendor/symfony/http-foundation/Session/Session.php[L:211](Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage:setId)
/home/rs2023/public_html/core/backend/Engine/LegacyHandler/LegacyHandler.php[L:305](Symfony\Component\HttpFoundation\Session\Session:setId)
/home/rs2023/public_html/core/backend/Engine/LegacyHandler/LegacyHandler.php[L:272](App\Engine\LegacyHandler\LegacyHandler:startSymfonySession)
/home/rs2023/public_html/core/backend/Module/LegacyHandler/ModuleNameMapperHandler.php[L:149](App\Engine\LegacyHandler\LegacyHandler:close)
/home/rs2023/public_html/core/backend/SystemConfig/LegacyHandler/SystemConfigHandler.php[L:146](App\Module\LegacyHandler\ModuleNameMapperHandler:getLegacyToFrontendMap)
/home/rs2023/public_html/cache/prod/Container9rpeNPx/App_KernelProdContainer.php[L:624](App\SystemConfig\LegacyHandler\SystemConfigHandler:__construct)
/home/rs2023/public_html/cache/prod/Container9rpeNPx/App_KernelProdContainer.php[L:1076](Container9rpeNPx\App_KernelProdContainer:getApp_SystemconfigsService)
/home/rs2023/public_html/cache/prod/Container9rpeNPx/App_KernelProdContainer.php[L:1066](Container9rpeNPx\App_KernelProdContainer:getUserHandlerService)
/home/rs2023/public_html/cache/prod/Container9rpeNPx/App_KernelProdContainer.php[L:1239](Container9rpeNPx\App_KernelProdContainer:getAuthenticationService)
/home/rs2023/public_html/cache/prod/Container9rpeNPx/App_KernelProdContainer.php[L:761](Container9rpeNPx\App_KernelProdContainer:getLegacySessionDenyAccessListenerService)
/home/rs2023/public_html/vendor/symfony/event-dispatcher/EventDispatcher.php[L:267](Container9rpeNPx\App_KernelProdContainer:Container9rpeNPx\{closure})
/home/rs2023/public_html/vendor/symfony/event-dispatcher/EventDispatcher.php[L:230](Symfony\Component\EventDispatcher\EventDispatcher:Symfony\Component\EventDispatcher\{closure})
/home/rs2023/public_html/vendor/symfony/event-dispatcher/EventDispatcher.php[L:59](Symfony\Component\EventDispatcher\EventDispatcher:callListeners)
/home/rs2023/public_html/vendor/symfony/http-kernel/HttpKernel.php[L:133](Symfony\Component\EventDispatcher\EventDispatcher:dispatch)
/home/rs2023/public_html/vendor/symfony/http-kernel/HttpKernel.php[L:79](Symfony\Component\HttpKernel\HttpKernel:handleRaw)
/home/rs2023/public_html/vendor/symfony/http-kernel/EventListener/ErrorListener.php[L:60](Symfony\Component\HttpKernel\HttpKernel:handle)
/home/rs2023/public_html/vendor/symfony/event-dispatcher/EventDispatcher.php[L:270](Symfony\Component\HttpKernel\EventListener\ErrorListener:onKernelException)
/home/rs2023/public_html/vendor/symfony/event-dispatcher/EventDispatcher.php[L:230](Symfony\Component\EventDispatcher\EventDispatcher:Symfony\Component\EventDispatcher\{closure})
/home/rs2023/public_html/vendor/symfony/event-dispatcher/EventDispatcher.php[L:59](Symfony\Component\EventDispatcher\EventDispatcher:callListeners)
/home/rs2023/public_html/vendor/symfony/http-kernel/HttpKernel.php[L:218](Symfony\Component\EventDispatcher\EventDispatcher:dispatch)
/home/rs2023/public_html/vendor/symfony/http-kernel/HttpKernel.php[L:90](Symfony\Component\HttpKernel\HttpKernel:handleThrowable)
/home/rs2023/public_html/vendor/symfony/http-kernel/Kernel.php[L:195](Symfony\Component\HttpKernel\HttpKernel:handle)
/home/rs2023/public_html/public/index.php[L:62](Symfony\Component\HttpKernel\Kernel:handle)
[Warning] session_name(): Session name cannot be changed after headers have already been sent occurred in /home/rs2023/public_html/vendor/symfony/http-foundation/Session/Storage/Proxy/AbstractProxy.php on line 116 [2023-03-27 20:05:29] display_stack_trace caller, file: /home/rs2023/public_html/public/legacy/include/utils.php line#: 3945
[L:](:StackTraceErrorHandler)
/home/rs2023/public_html/vendor/symfony/http-foundation/Session/Storage/Proxy/AbstractProxy.php[L:116](:session_name)
/home/rs2023/public_html/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php[L:201](Symfony\Component\HttpFoundation\Session\Storage\Proxy\AbstractProxy:setName)
/home/rs2023/public_html/vendor/symfony/http-foundation/Session/Session.php[L:228](Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage:setName)
/home/rs2023/public_html/core/backend/Engine/LegacyHandler/LegacyHandler.php[L:302](Symfony\Component\HttpFoundation\Session\Session:setName)
/home/rs2023/public_html/core/backend/Engine/LegacyHandler/LegacyHandler.php[L:272](App\Engine\LegacyHandler\LegacyHandler:startSymfonySession)
/home/rs2023/public_html/core/backend/Module/LegacyHandler/ModuleNameMapperHandler.php[L:149](App\Engine\LegacyHandler\LegacyHandler:close)
/home/rs2023/public_html/core/backend/SystemConfig/LegacyHandler/SystemConfigHandler.php[L:146](App\Module\LegacyHandler\ModuleNameMapperHandler:getLegacyToFrontendMap)
/home/rs2023/public_html/cache/prod/Container9rpeNPx/App_KernelProdContainer.php[L:624](App\SystemConfig\LegacyHandler\SystemConfigHandler:__construct)
/home/rs2023/public_html/cache/prod/Container9rpeNPx/App_KernelProdContainer.php[L:1076](Container9rpeNPx\App_KernelProdContainer:getApp_SystemconfigsService)
/home/rs2023/public_html/cache/prod/Container9rpeNPx/App_KernelProdContainer.php[L:1066](Container9rpeNPx\App_KernelProdContainer:getUserHandlerService)
/home/rs2023/public_html/cache/prod/Container9rpeNPx/App_KernelProdContainer.php[L:1239](Container9rpeNPx\App_KernelProdContainer:getAuthenticationService)
/home/rs2023/public_html/cache/prod/Container9rpeNPx/App_KernelProdContainer.php[L:761](Container9rpeNPx\App_KernelProdContainer:getLegacySessionDenyAccessListenerService)
/home/rs2023/public_html/vendor/symfony/event-dispatcher/EventDispatcher.php[L:267](Container9rpeNPx\App_KernelProdContainer:Container9rpeNPx\{closure})
/home/rs2023/public_html/vendor/symfony/event-dispatcher/EventDispatcher.php[L:230](Symfony\Component\EventDispatcher\EventDispatcher:Symfony\Component\EventDispatcher\{closure})
/home/rs2023/public_html/vendor/symfony/event-dispatcher/EventDispatcher.php[L:59](Symfony\Component\EventDispatcher\EventDispatcher:callListeners)
/home/rs2023/public_html/vendor/symfony/http-kernel/HttpKernel.php[L:133](Symfony\Component\EventDispatcher\EventDispatcher:dispatch)
/home/rs2023/public_html/vendor/symfony/http-kernel/HttpKernel.php[L:79](Symfony\Component\HttpKernel\HttpKernel:handleRaw)
/home/rs2023/public_html/vendor/symfony/http-kernel/EventListener/ErrorListener.php[L:60](Symfony\Component\HttpKernel\HttpKernel:handle)
/home/rs2023/public_html/vendor/symfony/event-dispatcher/EventDispatcher.php[L:230](Symfony\Component\HttpKernel\EventListener\ErrorListener:onKernelException)
/home/rs2023/public_html/vendor/symfony/event-dispatcher/EventDispatcher.php[L:59](Symfony\Component\EventDispatcher\EventDispatcher:callListeners)
/home/rs2023/public_html/vendor/symfony/http-kernel/HttpKernel.php[L:218](Symfony\Component\EventDispatcher\EventDispatcher:dispatch)
/home/rs2023/public_html/vendor/symfony/http-kernel/HttpKernel.php[L:111](Symfony\Component\HttpKernel\HttpKernel:handleThrowable)
/home/rs2023/public_html/vendor/symfony/http-kernel/EventListener/DebugHandlersListener.php[L:127](Symfony\Component\HttpKernel\HttpKernel:terminateWithException)
/home/rs2023/public_html/vendor/symfony/error-handler/ErrorHandler.php[L:607](Symfony\Component\HttpKernel\EventListener\DebugHandlersListener:Symfony\Component\HttpKernel\EventListener\{closure})
[L:](Symfony\Component\ErrorHandler\ErrorHandler:handleException)
[Warning] session_id(): Session ID cannot be changed after headers have already been sent occurred in /home/rs2023/public_html/vendor/symfony/http-foundation/Session/Storage/Proxy/AbstractProxy.php on line 92 [2023-03-27 20:05:29] display_stack_trace caller, file: /home/rs2023/public_html/public/legacy/include/utils.php line#: 3945
[L:](:StackTraceErrorHandler)
/home/rs2023/public_html/vendor/symfony/http-foundation/Session/Storage/Proxy/AbstractProxy.php[L:92](:session_id)
/home/rs2023/public_html/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php[L:185](Symfony\Component\HttpFoundation\Session\Storage\Proxy\AbstractProxy:setId)
/home/rs2023/public_html/vendor/symfony/http-foundation/Session/Session.php[L:211](Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage:setId)
/home/rs2023/public_html/core/backend/Engine/LegacyHandler/LegacyHandler.php[L:305](Symfony\Component\HttpFoundation\Session\Session:setId)
/home/rs2023/public_html/core/backend/Engine/LegacyHandler/LegacyHandler.php[L:272](App\Engine\LegacyHandler\LegacyHandler:startSymfonySession)
/home/rs2023/public_html/core/backend/Module/LegacyHandler/ModuleNameMapperHandler.php[L:149](App\Engine\LegacyHandler\LegacyHandler:close)
/home/rs2023/public_html/core/backend/SystemConfig/LegacyHandler/SystemConfigHandler.php[L:146](App\Module\LegacyHandler\ModuleNameMapperHandler:getLegacyToFrontendMap)
/home/rs2023/public_html/cache/prod/Container9rpeNPx/App_KernelProdContainer.php[L:624](App\SystemConfig\LegacyHandler\SystemConfigHandler:__construct)
/home/rs2023/public_html/cache/prod/Container9rpeNPx/App_KernelProdContainer.php[L:1076](Container9rpeNPx\App_KernelProdContainer:getApp_SystemconfigsService)
/home/rs2023/public_html/cache/prod/Container9rpeNPx/App_KernelProdContainer.php[L:1066](Container9rpeNPx\App_KernelProdContainer:getUserHandlerService)
/home/rs2023/public_html/cache/prod/Container9rpeNPx/App_KernelProdContainer.php[L:1239](Container9rpeNPx\App_KernelProdContainer:getAuthenticationService)
/home/rs2023/public_html/cache/prod/Container9rpeNPx/App_KernelProdContainer.php[L:761](Container9rpeNPx\App_KernelProdContainer:getLegacySessionDenyAccessListenerService)
/home/rs2023/public_html/vendor/symfony/event-dispatcher/EventDispatcher.php[L:267](Container9rpeNPx\App_KernelProdContainer:Container9rpeNPx\{closure})
/home/rs2023/public_html/vendor/symfony/event-dispatcher/EventDispatcher.php[L:230](Symfony\Component\EventDispatcher\EventDispatcher:Symfony\Component\EventDispatcher\{closure})
/home/rs2023/public_html/vendor/symfony/event-dispatcher/EventDispatcher.php[L:59](Symfony\Component\EventDispatcher\EventDispatcher:callListeners)
/home/rs2023/public_html/vendor/symfony/http-kernel/HttpKernel.php[L:133](Symfony\Component\EventDispatcher\EventDispatcher:dispatch)
/home/rs2023/public_html/vendor/symfony/http-kernel/HttpKernel.php[L:79](Symfony\Component\HttpKernel\HttpKernel:handleRaw)
/home/rs2023/public_html/vendor/symfony/http-kernel/EventListener/ErrorListener.php[L:60](Symfony\Component\HttpKernel\HttpKernel:handle)
/home/rs2023/public_html/vendor/symfony/event-dispatcher/EventDispatcher.php[L:230](Symfony\Component\HttpKernel\EventListener\ErrorListener:onKernelException)
/home/rs2023/public_html/vendor/symfony/event-dispatcher/EventDispatcher.php[L:59](Symfony\Component\EventDispatcher\EventDispatcher:callListeners)
/home/rs2023/public_html/vendor/symfony/http-kernel/HttpKernel.php[L:218](Symfony\Component\EventDispatcher\EventDispatcher:dispatch)
/home/rs2023/public_html/vendor/symfony/http-kernel/HttpKernel.php[L:111](Symfony\Component\HttpKernel\HttpKernel:handleThrowable)
/home/rs2023/public_html/vendor/symfony/http-kernel/EventListener/DebugHandlersListener.php[L:127](Symfony\Component\HttpKernel\HttpKernel:terminateWithException)
/home/rs2023/public_html/vendor/symfony/error-handler/ErrorHandler.php[L:607](Symfony\Component\HttpKernel\EventListener\DebugHandlersListener:Symfony\Component\HttpKernel\EventListener\{closure})
[L:](Symfony\Component\ErrorHandler\ErrorHandler:handleException)

I think that went a step further, but then crashed into the next problem.

Is your installation otherwise healthy? I see an error there about denied permissions, maybe you’re still not with a proper ownerships/permissions configuration?

For anyone else on Cpanel who has the above issue, the solution is here: Symfony calls the PHP garbage collector on Ubuntu 14.04 even when session.gc_probability is set to 0 - Stack Overflow

Unfortunately fixing that one only exposed the next problem, which is that with dev mode turned on I’m unable to load many pages due to some graphql issue.

Example request: {"operationName":"moduleMetadata","variables":{"id":"/api/module-metadata/leads"},"query":"query moduleMetadata($id: ID!) {\n moduleMetadata(id: $id) {\n id\n _id\n listView\n search\n recordView\n subPanel\n massUpdate\n recentlyViewed\n favorites\n __typename\n }\n}\n"}

Error: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

response:

 <div class="email-subject">
                                        
                            <a href="index.php?module=Emails&action=DisplayDetailView&folder_name={"data":{"moduleMetadata":{"id":"\/api\/module-metadata\/leads","_id":"leads","listView":{"columns":[{"name":"name","width":"10%","label":"LBL_LIST_NAME","link":true,"default":true,"module":"","id":"","sortable":true,"type":"name","orderBy":"name","related_fields":["first_name","last_name","salutation"],"fieldDefinition":{"name":"name","rname":"name","vname":"LBL_NAME","type":"name","link":true,"fields":
<<<TRUNCATED>>>

So there’s some random HTML that’s coming back before the json there… I’ve never worked with graphql before so it’s hard for me to figure out, but something’s wrong obviously. This only happens when in dev mode - so I’d been avoiding it, but that’s making it impossible to troubleshoot other issues

Do you have any custom code or addons? Try disabling that and see if the problem with the extra HTML still happens.

1 Like

It seems that disabling all custom modules allowed it to work. I then re-enabled them and it’s still working, so not quite sure what happened there. Thanks for the hint :slight_smile: