2013-11-05 34 views
2

我使用WordPress 3.5,子主題爲Twenty Eleven 1.5。突然,我得到以下警告,in wordpress,cp_admin_init和_canonical_charset的有效回調

Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'cp_admin_init' was given in /home/templ/public_html/wp-includes/plugin.php on line 406 

Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, '_canonical_charset' was given in /home/templ/public_html/wp-includes/plugin.php on line 173 

我使用的插件如下:

  1. 下載管理器2.3.9
  2. WordPress的搜索引擎優化1.4.7
  3. WP-pagenavi 2.83

一些積分:

1)如果我給mysite.com它給出2行以上警告。如果我給www.mysite.com,下面的行還包括,

Warning: Cannot modify header information - headers already sent by (output started at /home/templ/public_html/wp-includes/plugin.php:406) in /home/templ/public_html/wp-includes/pluggable.php on line 876 

2)如果我給mysite.com/wp-admin/www.mysite.com/wp -admin/,發出第一次警告和第三次警告。

3)如果我轉到www.mysite.com/wp-login.php,它給下列5警告。

Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'cp_admin_init' was given in /home/templ/public_html/wp-includes/plugin.php on line 406 

Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, '_canonical_charset' was given in /home/templ/public_html/wp-includes/plugin.php on line 173 

Warning: Cannot modify header information - headers already sent by (output started at /home/templ/public_html/wp-includes/plugin.php:406) in /home/templ/public_html/wp-login.php on line 368 

Warning: Cannot modify header information - headers already sent by (output started at /home/templ/public_html/wp-includes/plugin.php:406) in /home/templ/public_html/wp-login.php on line 380 

Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'wp_authenticate_spam_check' was given in /home/templ/public_html/wp-includes/plugin.php on line 173 

4)如果我給正確的用戶名和密碼,它不會登錄。給出下面的問題,

ERROR: Invalid username or incorrect password. 
ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress. 

我試圖找到解決辦法。我不能。誰能幫我?

+0

您安裝了最近的插件嗎?你使用什麼瀏覽器?您的服務器已升級您的PHP版本? – ColoO

回答

0

這聽起來像是一個損壞的安裝。所以你有幾個選項來解決這個問題:

但首先:做一個備份

請務必備份您的安裝! http://codex.wordpress.org/WordPress_Backups

獲取登錄工作:繼續之前掩蓋了症狀,

首先,我將禁用調試輸出,因爲這應該可以解決大多數問題。當Wordpress發生警告時,PHP開始編寫響應主體並關閉響應的標題部分。這意味着只要WordPress的嘗試添加另一頭原預警升高後,PHP將引發一個警告:

Warning: Cannot modify header information - headers already sent by (output started at /home/templ/public_html/wp-includes/plugin.php:406) in /home/templ/public_html/wp-login.php on line 380 

因此,如果我們禁用調試那麼我們應該能夠掩蓋症狀。這是一個快速補丁一個更大的問題,我們將有一個就地升級

禁用調試

解決確保以下常量存在,並正確設置在你wp-config.php文件

define('WP_DEBUG', false); 

define('WP_DEBUG_DISPLAY', false); 

現在,你應該能夠LOGI n作爲管理員無誤地發送到您的網站。

禁用您的插件

停用所有插件,Plugins -> Installed Plugins這是必要的,這樣我們就可以確保升級順利進行。

做一個更新

轉到Dashboard -> Updates並單擊Update NowRe-install Now

重新激活你的插件

重新激活所有插件,Plugins -> Installed Plugins並在必要時更新它們。

就是這樣

這對重新安裝WordPress的過程。這裏的關鍵是,您在生產網站上啓用了調試功能,這是不好的。在生產環境中,您應始終將WP_DEBUGWP_DEBUG_DISPLAY設置爲false