0

我被要求将某人的博客从 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

有任何想法吗?

4

3 回答 3

0

我认为您的 linux 服务器中的 php.ini 正在停用错误报告。

对于严格的标准,您可以通过E_STRICT从 php.ini 文件中的选项error_reporting中删除来隐藏它们(但修复它们可能会更好)。

对于其他问题,我确实建议您修复它们,尤其是警告。

还要检查 linux 中的 PHP 版本是否与 windows 中的相同,从一个版本迁移到另一个版本可能会导致这样的问题。

于 2012-08-03T10:53:03.883 回答
0

检查服务器和 xammp-box 上使用的 php 版本。您可以通过创建包含单行的单个文件来做到这一点

<?php phpinfo(); ?>

这为您提供了使用过的版本。如果您可以在新旧系统上使用相同的版本,您可以获得更少的警告,也许......

如果仍然存在警告,您可以使用 php.ini 中的正确条目将它们过滤掉。

于 2012-08-03T10:54:32.167 回答
0

建议生产系统不要显示错误,有人可能会使用这些信息来破解您的系统...您可以更改 Yazmat 提到的显示错误的详细级别,或者关闭php.ini中的错误显示,例如这个:

display_errors = 0
于 2012-08-03T11:02:52.423 回答