PHP CLI System_Daemon and error_reporting options ignored?

477 Views Asked by At

I'm making a daemon with System_Daemon for PHP. I can't get the default php error_reporting off.

I've tried

<?php
   error_reporting(0);
   set_ini('display_errors','off');
?>

but the warnings/notices are still showing when I execute the script from the console. Any ideas why this is happening or what I'm missing ? Probably it's some setting in System_Daemon ? :)

1

There are 1 best solutions below

2
On BEST ANSWER

It is ini_set not set_ini

ini_set('display_errors',0);

Look at here http://php.net/manual/en/function.ini-set.php you have to set o to hide notice/warnings.