致命错误:第 1610 行 C:\xampp\htdocs\wordpress\wp-includes\class-http.php 中超出了 30 秒的最大执行时间
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/32198287/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Fatal error: Maximum execution time of 30 seconds exceeded in C:\xampp\htdocs\wordpress\wp-includes\class-http.php on line 1610
提问by Shah Rukh
I am facing that error while installing Jet pack plugin on my WordPress localhost site. i have search on this site many answer but that not fulfill my requirement
在我的 WordPress localhost 站点上安装 Jet pack 插件时,我遇到了这个错误。我在这个网站上搜索了很多答案,但都不能满足我的要求
回答by Raphael
Please
请
- locate the file
[XAMPP Installation Directory]\php\php.ini
(e.g.C:\xampp\php\php.ini
) - open
php.ini
in Notepad or any Text editor - locate the line containing
max_execution_time
and - increase the value from 30 to some larger number (e.g. set:
max_execution_time = 90
) - then restart Apache web server from the XAMPP control panel
- 找到文件
[XAMPP Installation Directory]\php\php.ini
(例如C:\xampp\php\php.ini
) php.ini
在记事本或任何文本编辑器中打开- 找到包含
max_execution_time
和的行 - 将值从 30 增加到更大的数字(例如 set:
max_execution_time = 90
) - 然后从 XAMPP 控制面板重新启动 Apache Web 服务器
If there will still be the same error after that, try to increase the value for the max_execution_time
further more.
如果之后仍然出现相同的错误,请尝试进一步增加该值max_execution_time
。
回答by murphsy
@Raphael your solution does work. I encountered the same problem en solved it by increasing the maximum execution time to 180. There is an easier way to do it though:
@Raphael 您的解决方案确实有效。我遇到了同样的问题,通过将最大执行时间增加到 180 来解决它。不过有一个更简单的方法:
- Open the Xampp control panel
- Click on 'config' behind 'Apache'
- Select 'PHP (php.ini)' from the dropdown -> A file should now open in your text editor
Press ctrl+f and search for 'max_execution_time', you should fine a line which only says
max_execution_time=30
Change 30 to a bigger number (180 worked for me), like this:
max_execution_time=180
Save the file
- 'Stop' Apache server
- Close Xampp
- Restart Xampp
- 'Start' Apache server
- Update Wordpress from the Admin dashboard
- Enjoy ;)
- 打开 Xampp 控制面板
- 单击“Apache”后面的“config”
- 从下拉列表中选择“PHP (php.ini)” -> 现在应该在文本编辑器中打开一个文件
按 ctrl+f 并搜索“max_execution_time”,你应该罚款一行只说
最大执行时间=30
将 30 更改为更大的数字(180 对我有用),如下所示:
最大执行时间=180
保存文件
- “停止”Apache 服务器
- 关闭 Xampp
- 重启 Xampp
- “启动”Apache 服务器
- 从管理仪表板更新 Wordpress
- 享受 ;)
回答by Matthew Lock
If you are simply testing a local dev version of WordPress as I was an hitting timeouts when WordPress tries to update itself you can always disable updates for your local version like so: https://www.wpbeginner.com/wp-tutorials/how-to-disable-automatic-updates-in-wordpress/
如果您只是在测试 WordPress 的本地开发版本,因为我在 WordPress 尝试自我更新时遇到超时,您可以随时禁用本地版本的更新,如下所示:https: //www.wpbeginner.com/wp-tutorials/how -to-disable-automatic-updates-in-wordpress/
Don't do this for a production site!
不要为生产站点执行此操作!
回答by Engr. Kazi Shahadat Hossain
Find file:
[XAMPP Installation Directory]\php\php.ini
- open
php.ini
. - Find
max_execution_time
and increase the value of it as you required - Restart XAMPP control panel
查找文件:
[XAMPP Installation Directory]\php\php.ini
- 打开
php.ini
。 - 根据需要查找
max_execution_time
并增加它的价值 - 重启 XAMPP 控制面板