我主动提出在我的网络托管帐户上托管我堂兄的演员简介网站。他让人创建了一个wordpress网站并将其存储在我的帐户上。它在PhP 5.2上运行得很好,但我的主机提供商已经将其淘汰。现在,我被迫使用PhP 5.3或PhP 5.4,因此出现了许多错误。
如果有人知道是否/如何解决这个问题,请告诉我好吗?他依靠这个网站来获得工作,我很沮丧,因为我找不到答案,也无法自己解决。
使用PhP 5.4,我在页面内容上方发现以下错误:
Strict Standards: Declaration of Walker_Page::start_lvl() should be compatible with Walker::start_lvl(&$output) in /home/naumovski/tonynaumovskirotino.com/wp-includes/classes.php on line 576
Strict Standards: Declaration of Walker_Page::end_lvl() should be compatible with Walker::end_lvl(&$output) in /home/naumovski/tonynaumovskirotino.com/wp-includes/classes.php on line 576
Strict Standards: Declaration of Walker_Page::start_el() should be compatible with Walker::start_el(&$output) in /home/naumovski/tonynaumovskirotino.com/wp-includes/classes.php on line 576
Strict Standards: Declaration of Walker_Page::end_el() should be compatible with Walker::end_el(&$output) in /home/naumovski/tonynaumovskirotino.com/wp-includes/classes.php on line 576
Strict Standards: Declaration of Walker_PageDropdown::start_el() should be compatible with Walker::start_el(&$output) in /home/naumovski/tonynaumovskirotino.com/wp-includes/classes.php on line 593
Strict Standards: Declaration of Walker_Category::start_lvl() should be compatible with Walker::start_lvl(&$output) in /home/naumovski/tonynaumovskirotino.com/wp-includes/classes.php on line 687
Strict Standards: Declaration of Walker_Category::end_lvl() should be compatible with Walker::end_lvl(&$output) in /home/naumovski/tonynaumovskirotino.com/wp-includes/classes.php on line 687
Strict Standards: Declaration of Walker_Category::start_el() should be compatible with Walker::start_el(&$output) in /home/naumovski/tonynaumovskirotino.com/wp-includes/classes.php on line 687
Strict Standards: Declaration of Walker_Category::end_el() should be compatible with Walker::end_el(&$output) in /home/naumovski/tonynaumovskirotino.com/wp-includes/classes.php on line 687
Strict Standards: Declaration of Walker_CategoryDropdown::start_el() should be compatible with Walker::start_el(&$output) in /home/naumovski/tonynaumovskirotino.com/wp-includes/classes.php on line 710
Strict Standards: Redefining already defined constructor for class wpdb in /home/naumovski/tonynaumovskirotino.com/wp-includes/wp-db.php on line 58
Deprecated: Assigning the return value of new by reference is deprecated in /home/naumovski/tonynaumovskirotino.com/wp-includes/cache.php on line 99
Strict Standards: Redefining already defined constructor for class WP_Object_Cache in /home/naumovski/tonynaumovskirotino.com/wp-includes/cache.php on line 404
Deprecated: Assigning the return value of new by reference is deprecated in /home/naumovski/tonynaumovskirotino.com/wp-includes/query.php on line 21
Deprecated: Assigning the return value of new by reference is deprecated in /home/naumovski/tonynaumovskirotino.com/wp-includes/theme.php on line 576
在PhP 5.3上,我遇到以下错误:
Deprecated: Assigning the return value of new by reference is deprecated in /home/naumovski/tonynaumovskirotino.com/wp-includes/cache.php on line 99
Deprecated: Assigning the return value of new by reference is deprecated in /home/naumovski/tonynaumovskirotino.com/wp-includes/query.php on line 21
Deprecated: Assigning the return value of new by reference is deprecated in /home/naumovski/tonynaumovskirotino.com/wp-includes/theme.php on line 576
SO网友:Neil Robertson
Short Term Solution
根据以下答案:
https://stackoverflow.com/a/9984309/1983389 您可以通过更改php来抑制警告消息。ini或。htaccess文件。
在php中。ini更改
error_reporting = E_ALL
到
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT
如果您没有访问php的权限。ini,您可以将其潜在地放在您的中。htaccess文件:
php_value error_reporting 30711
这是E\\u ALL值(32767)和删除E\\u STRICT(2048)和E\\u NOTICE(8)值。
听起来您已经检查过了,但是一些web主机控制面板允许您选择一个旧版本的PHP,这也可以解决这个问题。
Long Term Solution
从安全性的角度来看,显然最好是跟上WordPress和PHP的最新版本,希望上述短期解决方案能为您赢得一些时间来计划和执行所需的更新。