gpt4 book ai didi

PHP:导入.SQL数据文件时的最大执行时间

转载 作者:IT老高 更新时间:2023-10-28 23:43:12 27 4
gpt4 key购买 nike

我正在尝试在 XAMPP 中使用 phpMyAdmin 导入一个大的 .sql 数据文件。然而,这需要很多时间,我不断得到:

Fatal error: Maximum execution time of 300 seconds exceeded in C:\xampp\phpMyAdmin\libraries\dbi\DBIMysqli.class.php on line 285

文件大约有 120 万行。

该文件大约 30MB 大,所以不是那么大。我真的不明白为什么要花这么长时间。

;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

; Maximum execution time of each script, in seconds
; http://php.net/max-execution-time
; Note: This directive is hardcoded to 0 for the CLI SAPI
max_execution_time=30000

; Maximum amount of time each script may spend parsing request data. It's a good
; idea to limit this time on productions servers in order to eliminate unexpectedly
; long running scripts.
; Note: This directive is hardcoded to -1 for the CLI SAPI
; Default Value: -1 (Unlimited)
; Development Value: 60 (60 seconds)
; Production Value: 60 (60 seconds)
; http://php.net/max-input-time
max_input_time=60

; Maximum input variable nesting level
; http://php.net/max-input-nesting-level
;max_input_nesting_level = 64

; How many GET/POST/COOKIE input variables may be accepted
; max_input_vars = 1000

; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
memory_limit=200M

这是xampp中php.ini的配置文件,由于某种原因我仍然得到

Fatal error: Maximum execution time of 300 seconds exceeded in C:\xampp\phpMyAdmin\libraries\dbi\DBIMysqli.class.php on line 285.

最佳答案

您可以在 libraries\config.default.php 中找到 phpMyAdmin 目录中有一个名为 $cfg['ExecTimeLimit'] 的配置变量,您可以将其设置为您需要的最长执行时间。

关于PHP:导入.SQL数据文件时的最大执行时间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22817670/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com