' . PHP_EOL ); fwrite( $fp, '<' . '?php // END HEADER ?' . '>' . PHP_EOL ); fclose( $fp ); wp_cache_setting( 'wp_cache_debug_log', $wp_cache_debug_log ); wp_cache_setting( 'wp_cache_debug_username', $wp_cache_debug_username ); } $msg = ' if ( !isset( $_SERVER[ "PHP_AUTH_USER" ] ) || ( $_SERVER[ "PHP_AUTH_USER" ] != "' . $wp_cache_debug_username . '" && $_SERVER[ "PHP_AUTH_PW" ] != "' . $wp_cache_debug_username . '" ) ) { header( "WWW-Authenticate: Basic realm=\"WP-Super-Cache Debug Log\"" ); header( $_SERVER[ "SERVER_PROTOCOL" ] . " 401 Unauthorized" ); echo "You must login to view the debug log"; exit; }' . PHP_EOL; $fp = fopen( $cache_path . 'view_' . $wp_cache_debug_log, 'w' ); if ( $fp ) { fwrite( $fp, '<' . '?php' . PHP_EOL ); $msg .= '$debug_log = file( "./' . $wp_cache_debug_log . '" ); $start_log = 1 + array_search( "<" . "?php // END HEADER ?" . ">" . PHP_EOL, $debug_log ); if ( $start_log > 1 ) { $debug_log = array_slice( $debug_log, $start_log ); } ?' . '>
This log file contains sensitive information about your website such as cookies and directories.
If you must share it please remove any cookies and remove any directories such as ' . ABSPATH . '.
"; foreach( $debug_log as $line ) { echo htmlspecialchars( $line ); } echo "