We have updated php from 7.4 to 8.0. Fatal error and Type error thrown during process results in exception being rendered as html and the above error is thrown. The core php method highlight_file() is called under the symphony component namespace as well. I have checked the php setting and highlight_file setting is enabled.

Exception 'Symfony\Component\ErrorHandler\Error\FatalError' with message 'Uncaught Error: Call to undefined function Symfony\Component\ErrorHandler\ErrorRenderer\highlight_file() in /var/www/d-S0GZ8USCH/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php:271
Stack trace:
#0 /var/www/d-S0GZ8USCH/vendor/symfony/error-handler/Resources/views/trace.html.php(36): Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer->fileExcerpt()
#1 /var/www/d-S0GZ8USCH/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php(353): include('...')
#2 /var/www/d-S0GZ8USCH/vendor/symfony/error-handler/Resources/views/traces.html.php(44): Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer->include()
#3 /var/www/d-S0GZ8USCH/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php(353): include('...')
#4 /var/www/d-S0GZ8USCH/vendor/symfony/error-handler/Resources/views/exception.html.php(58): Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer->include()
#5 /var/www/d-S0GZ8USCH/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php(353): include('...')
#6 /var/www/d-S0GZ8USCH/vendor/symfony/error-handler/Resources/views/exception_full.html.php(35): Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer->include()
#7 /var/www/d-S0GZ8USCH/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php(353): include('...')
#8 /var/www/d-S0GZ8USCH/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php(155): Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer->include()
#9 /var/www/d-S0GZ8USCH/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php(81): Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer->renderException()
#10 /var/www/d-S0GZ8USCH/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(568): Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer->render()
#11 /var/www/d-S0GZ8USCH/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(520): Illuminate\Foundation\Exceptions\Handler->renderExceptionWithSymfony()
#12 /var/www/d-S0GZ8USCH/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(503): Illuminate\Foundation\Exceptions\Handler->renderExceptionContent()
#13 /var/www/d-S0GZ8USCH/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(482): Illuminate\Foundation\Exceptions\Handler->convertExceptionToResponse()
#14 /var/www/d-S0GZ8USCH/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(356): Illuminate\Foundation\Exceptions\Handler->prepareResponse()
#15 /var/www/d-S0GZ8USCH/app/Exceptions/Handler.php(51): Illuminate\Foundation\Exceptions\Handler->render()
#16 /var/www/d-S0GZ8USCH/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(196): App\Exceptions\Handler->render()
#17 /var/www/d-S0GZ8USCH/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(173): Illuminate\Foundation\Bootstrap\HandleExceptions->renderHttpResponse()
#18 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleException()
#19 {main}
thrown' in /var/www/d-S0GZ8USCH/vendor/symfony/error-handler/ErrorRenderer/HtmlErrorRenderer.php:271
1

There are 1 answers

0
Ruach On

Getting this error means that highlight_file does not exist (the error message shows a non-fallback name). Have you disabled highlight_file in your php.ini ? https://github.com/symfony/symfony/discussions/46457