Heim  >  Fragen und Antworten  >  Hauptteil

PHP: Importieren Sie .SQL-Datendateien und verwalten Sie die maximale Ausführungszeit

Ich versuche, eine große .sql-Datendatei mit phpMyAdmin in XAMPP zu importieren. Allerdings nimmt das viel Zeit in Anspruch und ich bekomme immer wieder:

Schwerwiegender Fehler: Die maximale Ausführungszeit hat 300 Sekunden in C:xamppphpMyAdminlibrariesdbiDBIMysqli.class.php in Zeile 285 überschritten

Die Datei ist etwa 1,2 Millionen Zeilen lang.

Die Datei ist etwa 30 MB groß, also nicht so groß. Ich verstehe wirklich nicht, warum es so lange dauert.

;;;;;;;;;;;;;;;;;;;
; 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

Dies ist die Konfigurationsdatei für php.ini in xampp, aus irgendeinem Grund bekomme ich immer noch

Schwerwiegender Fehler: C:xamppphpMyAdminlibrariesdbiDBIMysqli.class.php Zeile 285 hat die maximale Ausführungszeit von 300 Sekunden überschritten.


P粉652523980P粉652523980340 Tage vor637

Antworte allen(1)Ich werde antworten

  • P粉662361740

    P粉6623617402023-10-16 00:54:28

    phpMyAdmin 目录中有一个名为 $cfg['ExecTimeLimit'] 的配置变量,您可以将其设置为无论您需要什么最大执行时间。

    Antwort
    0
  • StornierenAntwort