Php 将Wordpress站点从Linux移动到Windows会引发错误

Php 将Wordpress站点从Linux移动到Windows会引发错误,php,wordpress,xampp,Php,Wordpress,Xampp,我被要求将某人的博客从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 valu

我被要求将某人的博客从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文件中的
错误报告
选项中删除
E\u strict
来隐藏它们(但修复它们可能更好)

对于其余的问题,我建议您解决它们,特别是警告


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

检查服务器和xammp框中使用的PHP版本。您可以通过创建包含单行的单个文件来实现这一点

<?php phpinfo(); ?>

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


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

建议生产系统不要显示错误,有人可能会利用这些信息攻击您的系统。。。您可以更改Yazmat提到的显示错误的详细级别,或者关闭php.ini中的,如下所示:

display_errors = 0

它们是警告,不是错误。它们可能在Linux机器上,但被抑制了。在短期内,关闭警告,它可能会全部工作。您的新PHP环境可能是最新的,因此警告可能会导致更多的问题,因此您可能必须降级正在运行的PHP版本(不过,作为最后的手段,请执行此操作)。同时,让所有者知道,这样他们就可以得到一个PHP开发者来修复它们。你显然运行了一个非常旧的WordPress版本,应该考虑升级它。酷谢谢HalFER,虽然我看不到WordPress博客主页的HTML,但是我在HTDOCs中浏览本地主机到索引X.php文件。我想这应该是wordpress博客的主页?如果版本不同,我是否可以选择降级xampp中的版本?5.1.6旧站点-5.4.4新站点是的,您可以确定找到旧版本的PHP(谷歌会告诉您在哪里),或者将wordpress更新为与当前PHP兼容的最新版本。如果这个网站只是一个私人的小系统,不能公开访问,那么PHP的降级可能是更快的解决方案。演示如何更改版本。现在,您只需在某处找到旧版本即可。:)