How to crash apache w/php error logging

The offending line causes errors to log to a file, which is great, but if you are not rotating the logfile, eventually you’ll hit the max file size limit. Now, this file size is pretty big, but if you have all errors being logged (E_ALL | E_STRICT), you can reach that faster than you would think. This is the ini_set directive used:

ini_set("error_log", "../outside/of/web/root/error_log.txt");

Fortunately, you can rotate the logfile yourself within php:

$logfile = "../outside/of/web/root/php_error." . date('Y-m') . ".log";

if ( !file_exists($logfile) )
{
touch( $logfile );
}

ini_set('error_log', $logfile );