php 致命错误:在 phpMyAdmin 中执行时间超过 30 秒

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/15833536/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-25 10:03:02  来源:igfitidea点击:

Fatal error : execution time of 30 seconds exceeded in phpMyAdmin

phpmysqldatabasephpmyadmin

提问by Deepu

I have a MySQL table which contains 6.5 million records. When I try to access that table from phpMyAdmin I get:

我有一个包含 650 万条记录的 MySQL 表。当我尝试从 phpMyAdmin 访问该表时,我得到:

Fatal error: Maximum execution time of 30 seconds exceeded in C:\xampp-new\phpMyAdmin\libraries\display_tbl.lib.php on line 1457.

致命错误:第 1457 行的 C:\xampp-new\phpMyAdmin\libraries\display_tbl.lib.php 中超出了 30 秒的最大执行时间。

I am just trying to view the records and I am not doing any query which might cause the error.

我只是想查看记录,我没有做任何可能导致错误的查询。

This problem is only in my server. And my local machine does not contain as many records as the server.

这个问题只出现在我的服务器上。而且我的本地机器没有服务器包含那么多的记录。

In my php.iniI have already set the maximum execution time to maximum.

在我的php.ini我已经将最大执行时间设置为最大值。

How do I fix this error?

我该如何解决这个错误?

回答by M_R_K

Add this line

添加这一行

$cfg['ExecTimeLimit'] = 6000;

to phpmyadmin/config.inc.php

phpmyadmin/config.inc.php

And Change php.iniand my.ini

并更改php.inimy.ini

  • post_max_size = 750M
  • upload_max_filesize = 750M
  • max_execution_time = 5000
  • max_input_time = 5000
  • memory_limit = 1000M
  • max_allowed_packet = 200M (in my.ini)
  • post_max_size = 750M
  • upload_max_filesize = 750M
  • 最大执行时间 = 5000
  • 最大输入时间 = 5000
  • 内存限制 = 1000M
  • max_allowed_pa​​cket = 200M(在 my.ini 中)

回答by Brock Hensley

+1 for making me lookup lakhs. That looks like a PHP timeout to me as the default timeout is 30 seconds. Increase the setting in your php.ini and restart apache and see if the timeout persists.

+1 让我查找了 100。对我来说,这看起来像是 PHP 超时,因为默认超时是 30 秒。增加 php.ini 中的设置并重新启动 apache 并查看超时是否仍然存在。

http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time

http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time

回答by charles muojekwu

if you are using xammp on the xammp control panel at the apache line click on config and then click to open PHP(php.ini) find and increase max_execution_time=30 to max_execution_time=600.

如果您在 apache 行的 xammp 控制面板上使用 xammp,请单击配置,然后单击打开 PHP(php.ini) 找到并将 max_execution_time=30 增加到 max_execution_time=600。

回答by ??? ????

This solution has resolved the issue Place the following lines at the top of the script page and before the query that initiates the memory:

此解决方案已解决该问题 将以下行放置在脚本页面的顶部和启动内存的查询之前:

ini_set('max_execution_time', 0);
set_time_limit(1800);
ini_set('memory_limit', '-1');

回答by Prakash Choudhary

you need to set max_execution_time in php.ini

您需要在 php.ini 中设置 max_execution_time

max_execution_time=6000

max_execution_time=6000

HAPPY CODING

快乐编码