6

When I try to paste a large(5000 lines) sql file into PhpMyAdmin, I get this error? I know I can use the upload but on my old version of PhpMyAdmin this used to work without a problem.

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 have already tried changing the $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 
2
  • If you're importing some backup, try using the command line interface to import a file. Commented Aug 12, 2011 at 15:23
  • Ok but I don't work on the command line very often and I always have a browser open with PhpMyAdmin so this is a lot easier for me. Commented Aug 12, 2011 at 15:33

2 Answers 2

5

As far as I'm concerned this message means that Suhosin (a security patch for PHP) is blocking your request because of its length. The simplest way to solve your problem without changing Suhosin's config - is to import a file with the same SQL statements to PHPMyAdmin (it allows uploading files for import).

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

Sign up to request clarification or add additional context in comments.

Comments

1

If you really want to use PhpMyAdmin try using the version 3.4.3.2 or higher as I am not sure if yours version has got this

Partial import
Allow the interruption of an import in case the script detects it is close to the PHP timeout limit. (This might be good way to import large files, however it can break transactions.)

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

I hope it helps.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.