I had the same problem and tracked it down to an issue where the plugin processes its output twice if you have a 404 template.
Locate this block of code, somewhere around line 793 in askapache-google-404.php:
/**
* AAGoogle404Handler::handle_404()
*/
function handle_404()
{
//error_log(__FUNCTION__.':'.__LINE__);
global $wpdb, $posts, $post, $wp_did_header, $wp_did_template_redirect, $wp_query, $wp_rewrite, $wpdb, $wp_version, $wp, $id, $comment, $user_ID;
if ( is_array($wp_query->query_vars) ) extract( $wp_query->query_vars, EXTR_SKIP );
ob_start();
@header( "HTTP/1.1 {$this->status_code} {$this->reason}", 1 );
@header( "Status: {$this->status_code} {$this->reason}", 1 );
if ( $this->status_code == 400 || $this->status_code == 403 || $this->status_code == 405 || (string )$this->status_code[0] == '5' ) return $this->handle_non_404();
if ( file_exists(TEMPLATEPATH . '/404.php') && is_file(TEMPLATEPATH . '/404.php') ) load_template( TEMPLATEPATH . '/404.php' );
else {
get_header();
$this->handle_it();
get_sidebar();
get_footer();
}
ob_flush(); flush();
}
You need to comment out the section that asks about whether you have a 404 template. So, your new function should look like this:
/**
* AAGoogle404Handler::handle_404()
*/
function handle_404()
{
//error_log(__FUNCTION__.':'.__LINE__);
global $wpdb, $posts, $post, $wp_did_header, $wp_did_template_redirect, $wp_query, $wp_rewrite, $wpdb, $wp_version, $wp, $id, $comment, $user_ID;
if ( is_array($wp_query->query_vars) ) extract( $wp_query->query_vars, EXTR_SKIP );
ob_start();
@header( "HTTP/1.1 {$this->status_code} {$this->reason}", 1 );
@header( "Status: {$this->status_code} {$this->reason}", 1 );
if ( $this->status_code == 400 || $this->status_code == 403 || $this->status_code == 405 || (string )$this->status_code[0] == '5' ) return $this->handle_non_404();
/*
if ( file_exists(TEMPLATEPATH . '/404.php') && is_file(TEMPLATEPATH . '/404.php') ) load_template( TEMPLATEPATH . '/404.php' );
else {
get_header();
$this->handle_it();
get_sidebar();
get_footer();
}
*/
ob_flush(); flush();
}