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

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

问题描述:

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

我认为你的php.ini在你的linux服务器上是去激活错误报告。

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

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

此外,请检查Linux中的PHP版本与Windows中的版本相同,从版本迁移到另一版本可能会导致类似问题。

检查服务器上和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

建议生产系统不要显示错误,有人可以使用这些信息来破解你的系统......你可以改变Yazmat提到的显示错误的详细程度,或者在php中关闭displaying of errors。 ini像这样:

display_errors = 0