php_errors.log - Headers already sent

Hi there,

I got a lot of SD corruption recently (with two SD cards and a RPi-approved AC charger), though Volumio should only use it sparsely at boot and during audio playback.

So I got into logs to see if there was a lot of output produced and found out that php_errors.log is producing a ton of messages.

[20-Jan-2014 20:56:10 UTC] PHP Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /var/www/inc/player_lib.php:295) in /var/www/command/player_wrk.php on line 287 [20-Jan-2014 20:56:10 UTC] PHP Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /var/www/inc/player_lib.php:295) in /var/www/command/player_wrk.php on line 287

Apparently, it is related to a function sending headers before session_start() is called.
Usually it is because of whitespaces hidden in files.

Since I am no coder, I tried to remove all whitespaces, but it didn’t change anything.

Just to let you know, because this log file is quickly getting huge (two messages every 7 seconds).

Cheers,
Jdif

Unfortunately this seems to be a bug in the ever-looping worker file. Till this has been fixed I’ve suppressed the warning messages in the /var/www/command/player_wrk.php file by adding the following statement just before the loop (circa line 286), that is, just before the while statement:

error_reporting(E_ERROR | E_PARSE);

A restart will be needed for the change to have effect.