everytime I start php in the console I get some warnings.
xx@peach ~ $php -i | echo "test";
test
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/idn.so' - /usr/lib/php5/20100525/idn.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/suhosin.so' - /usr/lib/php5/20100525/suhosin.so: cannot open shared object file: No such file or directory in Unknown on line 0
considering the cli/php.ini there shouldn't be any warnings.
error_reporting = E_ALL & ~E_WARNING & ~E_NOTICE & ~E_DEPRECATED & ~E_USER_DEPRECATED & ~E_USER_NOTICE
display_errors = On
display_startup_errors = Off
I checked the used php.ini file via
xx@peach ~ $ php -i | grep 'Configuration File'
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/idn.so' - /usr/lib/php5/20100525/idn.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/suhosin.so' - /usr/lib/php5/20100525/suhosin.so: cannot open shared object file: No such file or directory in Unknown on line 0
Configuration File (php.ini) Path => /etc/php5/cli
Loaded Configuration File => /etc/php5/cli/php.ini
I don't get it why the warning is displayed every time I start php from console. I thought using "~E_WARNING" would disable the warning?
I guess your filter does not work because these warnings are startup errors (IIRC : E_STARTUP_WARNING), not traditional warnings.
They occur because you have 2 extensions that are configured in your php.ini but can't be found in the filesystem :
/usr/lib/php5/20100525/idn.so
/usr/lib/php5/20100525/suhosin.so
This can be caused by 2 factors :
If you want me to be more specific, I need to see your php.ini and the way php was installed on your machine ( distribution package or specific compilation)
Benjamin-