Log PHP errors to a file instead of the browser

// index.php, before anything can emit a warning. The directory has to be
// writable by the web server user, or all of this silently does nothing.
ini_set('display_errors', '0');
ini_set('log_errors', '1');
ini_set('error_log', '/var/log/php/shop-errors.log');
error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT);