Simple enough, don't try to open a session in CLI mode. It will not work for several reasons. This way you could do 2 things (depending on how dirty the hack you wanted):
if (!isset($argc)) {
session_start();
}
Or, set the session path to something writable (for example, /tmp) if via cli:
if (isset($argc)) {
session_save_path('/tmp');
}
(error_reporting(0)), , - ... @ ( , , , )