Dec 18 2008

How to cleaning up SENDMAIL spool

Cleaning the Mail Spool

There could be a lot of “trash” qf or df files left behind following a bout of misbehaving sendmails. If the size of either file is 0, you should be able to trash them safely.

cd /var/spool/mqueue-fixme

to get into your queue directory, and

Read more …

Dec 18 2008

IE ignores custom error pages

if you use php to create custom error pages (such as header('HTTP/1.1 500 Internal Server Error');) Internet Explorer ignores you custom page unless it is at least 512 (or sometimes 1024 bytes)

IE ignores custom error pages that are less than 512 (or from what i've read 1024) bytes.

just place this before any output on your custom error page--- and be sure that your custom error page includes proper html tags (it must have a </body> for this specific example to work)

<?php
// set your custom error header --- example --- header('HTTP/1.1 503 Service Unavailable');

function padding($html){
return (
$padding=1024-ob_get_length()) > 0 ? str_replace('</body>','<!--'. ($padding>8?str_repeat(' ',$padding-8) :null ).'-->'."\n".'</body>',$html) : $html;
}

ob_start('padding');
?>

and then place this somewhere within the html error page output

<!-- ---- -->

that will auto-adjust to pad the file to 1024 bytes to override the default Internet Explorer error pages.