Salut hibou, merci pour ton aide.
J'ai suivi ton raisonnement, sans pour autant réussi quoi que se soit. Par conséquent je t'indique le sébut de mon code PHP jusqu'a la ligne 80.
function wp_cache_phase2() {
global $wpsc_settings;
global $cache_filename, $cache_acceptable_files, $wp_cache_gzip_encoding, $super_cache_enabled, $cache_rebuild_files, $wp_cache_last_gc;
global $cache_max_time, $wp_cache_request_uri, $super_cache_enabled, $wp_cache_object_cache;
global $cache_enabled, $wp_cache_gmt_offset, $wp_cache_blog_charset;
if ( $cache_enabled == false )
return false;
if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( 'In WP Cache Phase 2', 5 );
$wp_cache_gmt_offset = get_option( 'gmt_offset' ); // caching for later use when wpdb is gone. http://wordpress.org/support/topic/224349
$wp_cache_blog_charset = get_option( 'blog_charset' );
wp_cache_mutex_init();
if(function_exists('add_action') && ( !defined( 'WPLOCKDOWN' ) || ( defined( 'WPLOCKDOWN' ) && constant( 'WPLOCKDOWN' ) == '0' ) ) ) {
if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( 'Setting up WordPress actions', 5 );
// Post ID is received
add_action('publish_post', 'wp_cache_post_edit', 0);
add_action('edit_post', 'wp_cache_post_change', 0); // leaving a comment called edit_post
add_action('delete_post', 'wp_cache_post_edit', 0);
add_action('publish_phone', 'wp_cache_post_edit', 0);
// Coment ID is received
add_action('trackback_post', 'wp_cache_get_postid_from_comment', 99);
add_action('pingback_post', 'wp_cache_get_postid_from_comment', 99);
add_action('comment_post', 'wp_cache_get_postid_from_comment', 99);
add_action('edit_comment', 'wp_cache_get_postid_from_comment', 99);
add_action('wp_set_comment_status', 'wp_cache_get_postid_from_comment', 99, 2);
// No post_id is available
add_action('switch_theme', 'wp_cache_no_postid', 99);
add_action('edit_user_profile_update', 'wp_cache_no_postid', 99);
add_action( 'wp_update_nav_menu', 'wp_cache_clear_cache' );
add_action('wp_cache_gc','wp_cache_gc_cron');
do_cacheaction( 'add_cacheaction' );
}
if ( is_admin() ) {
if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( 'Not caching wp-admin requests.', 5 );
return false;
}
if ( $_SERVER["REQUEST_METHOD"] == 'POST' || !empty( $_POST ) || get_option( 'gzipcompression' ) ) {
if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( 'Not caching POST request.', 5 );
return false;
}
if ( $wp_cache_object_cache && !empty( $_GET ) ) {
if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( 'Not caching GET request while object cache storage enabled.', 5 );
return false;
}
if ( isset( $_GET[ 'preview' ] ) ) {
if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( 'Not caching preview post.', 2 );
return false;
}
if ( !empty( $_GET ) ) {
if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( 'Supercache caching disabled. Only using wp-cache. Non empty GET request.', 5 );
$super_cache_enabled = false;
}
$script = basename($_SERVER['PHP_SELF']);
if (!in_array($script, $cache_acceptable_files) && wp_cache_is_rejected($wp_cache_request_uri)) {
if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( 'URI rejected. Not Caching', 2 );
return false;
}
if (wp_cache_user_agent_is_rejected()) {
if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "USER AGENT ({$_SERVER[ 'HTTP_USER_AGENT' ]}) rejected. Not Caching", 4 );
return;
}
if($wp_cache_gzip_encoding)
header('Vary: Accept-Encoding, Cookie');
else
header('Vary: Cookie');
exit(); [code=php]
NB : Je peux maintenant accéder à la page d'accueil de mon site, mais lorsque je clique sur un article, il y a deux messages d'erreur qui s'affiche:
Le premier est :
Warning: Cannot modify header information - headers already sent by (output started at /home/lechibip/public_html/index.php:2) in /home/lechibip/public_html/wp-content/plugins/wp-super-cache/wp-cache-phase2.php on line 79
Le second est :
Warning: Cannot modify header information - headers already sent by (output started at /home/lechibip/public_html/index.php:2) in /home/lechibip/public_html/wp-includes/pluggable.php on line 897