A contractor that is responsible for a PHP-based website on a host that I’m supervising recently migrated the software to PHP 8. Since then the web server logs are full with a lot of error messages that it receives from the PHP interpreter, see the samples below.
I asked the contractor what this means, particularly with regards to the site’s reliability and I expressed my concern that such a flood of messages is noise in case of a problem. The answer I received stated that these would be harmless deprecation warnings that were introduced with PHP 8.2.
As someone with a strong Python experience these messages read rather harsh to me, e.g. like an AttributeError or IndexError that would cause a Python interpreter to halt.
My questions are:
- Am I too worried about the messages, are these acceptable in the PHP domain / wider developer community?
- If so, how should I configure the PHP interpreter to filter out non-harmful error messages?
webhostname nginx: 2023/10/17 11:27:36 [error] 834#834: *8705 FastCGI sent in stderr: "PHP message: PHP Warning: Undefined array key "modifier" in /var/www/html/webrootfolder/cache/templates/256a29127060783644bfb37fe274453c8ba4ce2c_0.file.main.tpl.php on line 52PHP message: PHP Warning: Trying to access array offset on value of type null in /var/www/html/webrootfolder/cache/templates/256a29127060783644bfb37fe274453c8ba4ce2c_0.file.main.tpl.php on line 52PHP message: PHP Warning: Trying to access array offset on value of type null in /var/www/html/webrootfolder/cache/templates/256a29127060783644bfb37fe274453c8ba4ce2c_0.file.main.tpl.php on line 52PHP message: PHP Fatal error: Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, no array or string given in /var/www/html/webrootfolder/cache/templates/256a29127060783644bfb37fe274453c8ba4ce2c_0.file.main.tpl.php:52
Stack trace:
#0 /var/www/html/webrootfolder/libs/sysplugins/smarty_template_resource_base.php(123): content_650af2c756a474_07645705()
#1 /var/www/html/webrootfolder/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode()
#2 /var/www/html/webrootfolder/libs/sysplugins/smarty_internal_template.php(217): Smarty_Template_Compiled->render()
#3 /var/www/html/webrootfolder/libs/sysplugins/smarty_internal_template.php(386): Smarty_Internal_Template->render()
#4 /var/www/html/webrootfolder/libs/sysplugins/smarty_internal_runtime_inheritance.php(116): Smarty_Internal_Template->_subTemplateRender()
#5 /var/www/html/www.matte" while reading response header from upstream, client: 1.2.3.4, server: webrootfolder, request: "GET /apple-touch-icon-precomposed.png HTTP/2.0", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "www.domain.org"
webhostname nginx: 2023/10/17 11:15:02 [error] 834#834: *8066 FastCGI sent in stderr: "PHP message: PHP Fatal error: Array and string offset access syntax with curly braces is no longer supported in /var/www/html/webrootfolder/libs/icalcreator/src/Util/Util.php on line 974" while reading response header from upstream, client: 1.2.3.4, server: www.domain.org, request: "GET /resource.ics HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "webrootfolder", referrer: "…"
webhostname nginx: 2023/10/17 11:01:41 [error] 834#834: *7670 FastCGI sent in stderr: "PHP message: PHP Warning: Undefined property: stdClass::$ogImage in /var/www/html/webrootfolder/controllers/show_show.inc.php on line 58" while reading response header from upstream, client: 1.2.3.4, server: www.domain.org, request: "GET /resource.html HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "www.domain.org"
webhostname nginx: 2023/10/17 10:05:55 [error] 834#834: *6052 FastCGI sent in stderr: "PHP message: PHP Warning: Attempt to read property "embed" on bool in /var/www/html/webrootfolder/cache/templates/db7e5f92d02757ec0c1373f5e06f2329b5e7f84f_0.file.element_block_video.tpl.php on line 26" while reading response header from upstream, client: 1.2.3.4, server: www.domain.org, request: "GET /path/?preview HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "www.domain.org"