Issue:
Running website on Plesk Onyx Version 17.8.11 Update #43 and running PHP 7.3.2 as FPM application served by Apache. PHP error messages are being duplicated and not displaying errors on a new line.
Result:
[Tue Mar 05 11:08:29.409366 2019] [proxy_fcgi:error] [pid 3293:tid 139890247272192] [client 127.0.0.1:44282] AH01071: Got error 'PHP message: PHP Warning: in_array() expects parameter 2 to be array, null given in /var/www/vhosts/domain.tld/httpdocs/script.php on line 522PHP message: PHP Notice: Array to string conversion in /var/www/vhosts/domain.tld/httpdocs/script.php on line 524PHP message: PHP Warning: in_array() expects parameter 2 to be array, null given in /var/www/vhosts/domain.tld/httpdocs/script.php on line 522PHP message: PHP Notice: Array to string conversion in /var/www/vhosts/domain.tld/httpdocs/script.php on line 524PHP message: PHP Warning: in_array() expects parameter 2 to be array, null given in /var/www/vhosts/domain.tld/httpdocs/script.php on line 522PHP message: PHP Notice: Array to string conversion in /var/www/vhosts/domain.tld/httpdocs/script.php on line 524', referer: https://new.domain.tld/webpage.html
Expected Result:
[Tue Mar 05 11:08:29.409366 2019] [proxy_fcgi:error] [pid 3293:tid 139890247272192] [client 127.0.0.1:44282] AH01071: PHP Warning: in_array() expects parameter 2 to be array, null given in /var/www/vhosts/domain.tld/httpdocs/script.php on line 522, referer: https://new.domain.tld/webpage.html
[Tue Mar 05 11:08:29.409366 2019] [proxy_fcgi:error] [pid 3293:tid 139890247272192] [client 127.0.0.1:44282] AH01071: PHP Notice: Array to string conversion in /var/www/vhosts/domain.tld/httpdocs/script.php on line 524, referer: https://new.domain.tld/webpage.html
Question:
I recently migrated from PHP 5.6 to 7.3 and the error output to my log file was different. How do I get PHP to not duplicate errors and log them individually?
Update:
I was able to remove the duplicated errors by turning ignore_repeated_source
On
in the php.ini
, however the error messages are still being concatenated together.