admin管理员组文章数量:1394167
If I try to upgrade to PHP 7 or up (from 5.6), I have one site that is throwing a PHP error.
I have tried uninstalling all plugins and activating the Twenty Twenty theme before changing PHP version. No dice.
Is there a setting in the database or core that would be effecting this? I also tried a default .htaccess file.
EDIT: WP debug.log says:
[10-Mar-2020 23:35:45 UTC] PHP Fatal error: Allowed memory size of 2097152 bytes exhausted (tried to allocate 32768 bytes) in /path/public_html/wp-includes/formatting.php on line 1600
[10-Mar-2020 23:35:45 UTC] PHP Fatal error: Allowed memory size of 2097152 bytes exhausted (tried to allocate 32768 bytes) in /path/public_html/wp-includes/version.php on line 1
But this seems unrelated, right? The site is having i/o issues as well.
If I try to upgrade to PHP 7 or up (from 5.6), I have one site that is throwing a PHP error.
I have tried uninstalling all plugins and activating the Twenty Twenty theme before changing PHP version. No dice.
Is there a setting in the database or core that would be effecting this? I also tried a default .htaccess file.
EDIT: WP debug.log says:
[10-Mar-2020 23:35:45 UTC] PHP Fatal error: Allowed memory size of 2097152 bytes exhausted (tried to allocate 32768 bytes) in /path/public_html/wp-includes/formatting.php on line 1600
[10-Mar-2020 23:35:45 UTC] PHP Fatal error: Allowed memory size of 2097152 bytes exhausted (tried to allocate 32768 bytes) in /path/public_html/wp-includes/version.php on line 1
But this seems unrelated, right? The site is having i/o issues as well.
Share Improve this question edited Mar 10, 2020 at 23:43 Lime asked Mar 10, 2020 at 23:12 LimeLime 1286 bronze badges 2- 1 You may have to turn on debugging and check either the debug.log or the server logs in order to determine more information. – butlerblog Commented Mar 10, 2020 at 23:24
- 1 When upgrading to 7 were all related php modules also upgraded? Are appropriate handlers present in your http server config? Mine has handlers for php5, php7.2 and php7.3 so I can switch between versions. But if you have handlers for (addhandler in apache) for v5 and you're running 7 you might have issues. I'm just plucking straws out of thin air here. :) – Admiral Noisy Bottom Commented Mar 11, 2020 at 1:27
2 Answers
Reset to default 1try doing wp_debug true and if the issue is of memory allocation try allocating memory in the wp-config
define('WP_MEMORY_LIMIT', '64M');
If it is not fixed try increasing the memory limit.
'500' errors are really hard to debug. It's sort of a 'something went wrong but I got no details that will help you figure out what went wrong'. Even the error message that you put in your question is not that helpful. And any help via the googles/bings/ducks are all over the place.
There are settings in php.ini that you can do to increase available memory; you may need to talk to your hosting place to increase memory that is available to PHP.
You might also try a generic/base wp-config.php and wp-settings.php file in case there are some modifications that have been done there.
I'd go with adjusting memory settings in the php.ini file, and looking at any memory settings in the wp-config.php file. You might also try a new install of WP with nothing else and place it in a subfolder of your public_html file. Then you can set up that instance with PHP 7.3 with whatever settings that are done via your hosting place (you can have different PHP versions running in different subfolders).
本文标签: debugSite throws 500 error after upgrading from PHP 56 to 7X
版权声明:本文标题:debug - Site throws 500 error after upgrading from PHP 5.6 to 7.X 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744680005a2619344.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论