簡體   English   中英

將Wordpress網站從Linux移至Windows會引發錯誤

[英]Moving Wordpress site from Linux to Windows throws errors

我一直在問到移動從Linux服務器某人的博客到Windows 2008框。 我在新盒子上使用了Xampp。 當我嘗試訪問博客時,出現以下錯誤:

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

有任何想法嗎?

我認為您的linux服務器中的php.ini正在停用錯誤報告。

對於嚴格的標准,您可以通過從php.ini文件中的error_reporting選項中刪除E_STRICT來隱藏它們(但最好對其進行修復)。

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

還要檢查Linux中的PHP版本是否與Windows中的PHP版本相同,從一個版本遷移到另一個版本可能會導致這樣的問題。

檢查服務器和xammp-box上使用的php版本。 您可以通過創建一個包含單行的文件來做到這一點

<?php phpinfo(); ?>

這為您提供了使用的版本。 如果您可以在新舊系統上使用相同的版本,則可能會收到較少的警告,也許...

而且,如果仍然有警告,您可以使用php.ini中的正確條目將其過濾掉。

建議生產系統不要顯示錯誤,有人可以使用該信息來入侵您的系統...您可以按照Yazmat所述更改顯示錯誤的詳細程度,或者關閉php.ini中的錯誤顯示,例如這個:

display_errors = 0

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM