function postie_environment()
{
    DebugEcho("Postie Version: " . POSTIE_VERSION);
    DebugEcho("Wordpress Version: " . get_bloginfo('version'));
    DebugEcho("PHP Version: " . phpversion());
    DebugEcho("OS: " . php_uname());
    DebugEcho("Debug mode: " . (IsDebugMode() ? "On" : "Off"));
    DebugEcho("Time: " . date('Y-m-d H:i:s', time()) . " GMT");
    DebugEcho("Error log: " . ini_get('error_log'));
    DebugEcho("TMP dir: " . get_temp_dir());
    if (isMarkdownInstalled()) {
        EchoInfo("You currently have the Markdown plugin installed. It will cause problems if you send in HTML email. Please turn it off if you intend to send email using HTML.");
    }
    if (!isPostieInCorrectDirectory()) {
        EchoInfo("Warning! Postie expects to be in its own directory named postie.");
    } else {
        DebugEcho("Postie is in " . plugin_dir_path(__FILE__));
    }
    if (defined('ALTERNATE_WP_CRON') && ALTERNATE_WP_CRON) {
        DebugEcho("Alternate cron is enabled");
    }
    if (defined('DISABLE_WP_CRON') && DISABLE_WP_CRON) {
        DebugEcho("WordPress cron is disabled. Postie will not run unless you have an external cron set up.");
    }
    DebugEcho("Cron: " . (defined('DISABLE_WP_CRON') && DISABLE_WP_CRON === true ? "Off" : "On"));
    DebugEcho("Alternate Cron: " . (defined('ALTERNATE_WP_CRON') && ALTERNATE_WP_CRON === true ? "On" : "Off"));
    if (defined('WP_CRON_LOCK_TIMEOUT') && WP_CRON_LOCK_TIMEOUT === true) {
        DebugEcho("Cron lock timeout is:" . WP_CRON_LOCK_TIMEOUT);
    }
    if (HasIconvInstalled()) {
        DebugEcho("iconv: installed");
    } else {
        EchoInfo("Warning! Postie requires that iconv be enabled.");
    }
    if (function_exists('imap_mime_header_decode')) {
        DebugEcho("imap: installed");
    } else {
        DebugEcho("Warning! Postie requires that imap be enabled if you are using IMAP, IMAP-SSL or POP3-SSL.");
    }
    if (HasMbStringInstalled()) {
        DebugEcho("mbstring: installed");
    } else {
        EchoInfo("Warning! Postie requires that mbstring be enabled.");
    }
}
Example #2
0
?>

    <br/>
    <h2>International support</h2>
    <?php 
if (HasIconvInstalled()) {
    EchoInfo("iconv: installed");
} else {
    EchoInfo("Warning! Postie requires that iconv be enabled.");
}
if (function_exists('imap_mime_header_decode')) {
    EchoInfo("imap: installed");
} else {
    EchoInfo("Warning! Postie requires that imap be enabled if you are using IMAP, IMAP-SSL or POP3-SSL.");
}
if (HasMbStringInstalled()) {
    EchoInfo("mbstring: installed");
} else {
    EchoInfo("Warning! Postie requires that mbstring be enabled.");
}
?>

    <h2>Clock Tests</h2>
    <p>This shows what time it would be if you posted right now</p>
    <?php 
$content = "";
$data = filter_Delay($content);
EchoInfo("GMT: {$data['1']}");
EchoInfo("Current: {$data['0']}");
?>