2012-08-03 137 views
0

我被要求將某人的博客從Linux服務器移動到Windows 2008框。我在新盒子上使用了Xpppp。當我嘗試訪問博客時,出現以下錯誤:將Wordpress站點從Linux移動到Windows會引發錯誤

Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\newblogBlog\httpdocs\wp-settings.php on line 472 

Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\newblogBlog\httpdocs\wp-settings.php on line 487 

Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\newblogBlog\httpdocs\wp-settings.php on line 494 

Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\newblogBlog\httpdocs\wp-settings.php on line 530 

Strict Standards: Declaration of Walker_Page::start_lvl() should be compatible with Walker::start_lvl(&$output) in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\classes.php on line 594 

Strict Standards: Declaration of Walker_Page::end_lvl() should be compatible with Walker::end_lvl(&$output) in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\classes.php on line 594 

Strict Standards: Declaration of Walker_Page::start_el() should be compatible with Walker::start_el(&$output) in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\classes.php on line 594 

Strict Standards: Declaration of Walker_Page::end_el() should be compatible with Walker::end_el(&$output) in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\classes.php on line 594 

Strict Standards: Declaration of Walker_PageDropdown::start_el() should be compatible with Walker::start_el(&$output) in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\classes.php on line 611 

Strict Standards: Declaration of Walker_Category::start_lvl() should be compatible with Walker::start_lvl(&$output) in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\classes.php on line 705 

Strict Standards: Declaration of Walker_Category::end_lvl() should be compatible with Walker::end_lvl(&$output) in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\classes.php on line 705 

Strict Standards: Declaration of Walker_Category::start_el() should be compatible with Walker::start_el(&$output) in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\classes.php on line 705 

Strict Standards: Declaration of Walker_Category::end_el() should be compatible with Walker::end_el(&$output) in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\classes.php on line 705 

Strict Standards: Declaration of Walker_CategoryDropdown::start_el() should be compatible with Walker::start_el(&$output) in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\classes.php on line 728 

Strict Standards: Redefining already defined constructor for class wpdb in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\wp-db.php on line 306 

Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\cache.php on line 103 

Strict Standards: Redefining already defined constructor for class WP_Object_Cache in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\cache.php on line 425 

Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\query.php on line 21 

Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\theme.php on line 623 

Strict Standards: Redefining already defined constructor for class WP_Dependencies in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\class.wp-dependencies.php on line 15 

Warning: Creating default object from empty value in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\update.php on line 39 

Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\class.wp-dependencies.php:15) in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\pluggable.php on line 770 

任何想法?

+1

他們是_warnings_,而不是錯誤。他們可能在Linux上,但被壓制。在短期內,關閉警告,它可能都可以工作。您的新PHP環境可能更新,因此警告可能會導致更多問題,因此您可能必須降級正在運行的PHP版本(然而,這是最後一招)。另外,讓所有者知道,這樣他們可以讓PHP開發人員修復它們。 – halfer 2012-08-03 10:50:45

+1

你顯然運行*非常舊版本的Wordpress,應該考慮升級它。 – fdomig 2012-08-03 10:54:28

+0

酷感謝halfer,雖然我不能看到wordpress博客主頁的html,即時瀏覽本地主機到httdocs中的index.php文件。我認爲這應該是wordpress博客的主頁? – user1238321 2012-08-03 10:57:16

回答

0

我認爲你的php.ini在你的linux服務器上是去激活錯誤報告。

對於嚴格的標準,您可以通過從您的php.ini文件中的選項error_reporting中刪除E_STRICT來隱藏它們(但它可能更好)。

對於其他問題,我建議您修復它們,尤其是警告。

此外,請檢查Linux中的PHP版本與Windows中的版本相同,從版本遷移到另一版本可能會導致類似問題。

0

檢查服務器上和xammp-box上使用的php版本。您可以通過創建包含單行文件的單個文件來執行此操作。

<?php phpinfo(); ?> 

這會給您使用的版本。如果你可以在舊系統和新系統上使用相同的版本,你可以得到更少的警告,也許...

如果仍有警告,可以用php.ini中的正確條目過濾它們。

+0

如果版本不同我可以選擇在xampp中降級版本嗎? – user1238321 2012-08-03 11:07:11

+0

5.1.6舊網站 - 5.4.4新網站 – user1238321 2012-08-03 11:21:36

+0

是的,你可以肯定地找到舊版本的PHP(谷歌會告訴你在哪裏),或者更新Wordpress到最新版本,該版本與目前的PHP。如果這個網站只是一個私人的小系統而不是公開的,那麼降級PHP可能是更快的解決方案。 – 2012-08-03 11:41:37

0

建議生產系統不要顯示錯誤,有人可以使用這些信息來破解你的系統......你可以改變Yazmat提到的顯示錯誤的詳細程度,或者在php中關閉displaying of errors。 ini像這樣:

display_errors = 0