PhpMyAdmin timeout with large SQL import error

When I try to insert a large (5000 rows) sql file into PhpMyAdmin, do I get this error? I know I can use the download, but on my old version of PhpMyAdmin this worked without problems.

ALERT - configured request variable value length limit exceeded - dropped variable 'sql_query' (attacker '111.171.123.123', file '/usr/share/apache2/phpmyadmin/import.php'), referer: https://example.co.uk/phpmyadmin/db_sql.php?db=test&server=1& token=0f355f8bbc6fc09d5c512e0409e9cac9&db_query_force=1 

I already tried to change $cfg['ExecTimeLimit'] = 0;

php.ini

 ;;;;;;;;;;;;;;;;;;; ; Resource Limits ; ;;;;;;;;;;;;;;;;;;; ; Maximum execution time of each script, in seconds max_execution_time = 120 ; Maximum amount of time each script may spend parsing request data max_input_time = 60 ;max_input_nesting_level = 64 ; Maximum input variable nesting level ;Maximum amount of memory a script may consume (128MB) memory_limit = 100M 
+4
source share
2 answers

As far as I know, this message means that Suhosin (security patch for PHP) blocks your request due to its length. The easiest way to solve your problem without changing the configuration of Suhosin is to import a file with the same SQL statements into PHPMyAdmin (it allows you to upload files for import).

So basically all you need to do is create a simple text file, paste the same SQL statements into it and load this file into PHPMyAdmin - it has a corresponding page for such import.

+4
source

If you really want to use PhpMyAdmin, try using version 3.4.3.2 or higher, since I'm not sure if your version has this

Partial import
Allow import interruption if the script detects that it is close to the PHP timeout limit. (This may be a good way to import large files, however it may break transactions.)

http://www.phpmyadmin.net/home_page/index.php

Hope this helps.

+1
source

All Articles