How do you disable strict errors for PHP 5.4 & 5.5 in Drupal 7 via the settings.php file?
And the Drupal way:

Add this line in settings.php

$conf['error_level'] = 0; // 0: None, 1: Errors and warnings, 2: All messages


You can set any persistent variable this way. You can get the variable names simply using Firebug or any browser's developer tool and check the name attribute of the input field in the administration form. Which in you case the Logging &amp; Errors page. If you look at the source code, the radio buttons have the name attribute error_level and each radio button has a value attribute. Simply set this value to the variable in you settings.php using $conf array.

You can also set any variable using variable_set() function in any custom module, in an update script for example.

Or using Drush:

drush vset error_level 0