2

I am importing an sql file for a magento website, however, It gives me this error:

Unknown: Input variables exceeded 1000. To increase the limit change   
max_input_vars in php.ini

Then I modified the max_input_vars to 3000 in the php.ini but it doesn't seem to take effect. I'm pretty new at this and it's driving me nuts.

6
  • Presumably you restarted Apache/PHP after making the change to php.ini? What version of PHP are you running? (Curious why you get this error when "importing an SQL file"?)
    – DocRoot
    Oct 8 '16 at 9:31
  • I have not tried restarting the apache yet. Is this what caused the changes to not take effect?
    – rendell
    Oct 8 '16 at 9:38
  • Yes, Apache will need to be restarted for the changes to php.ini to take effect (assuming this is the main php.ini file and not a per-directory php.ini file?).
    – DocRoot
    Oct 8 '16 at 9:41
  • It's the one in cpanel where I can change the values of variable. Do I need an ssh access to be able to restart apache? Cos I don't see any options in cpanel to restart.
    – rendell
    Oct 8 '16 at 9:44
  • I'm not familiar with that option in cPanel - is this your own server? However, if cPanel gives you the option then it must "do the necessary" for you I would assume. Incidentally, this setting can also be set in .htaccess and .user.ini files - you don't need cPanel/php.ini to set this (although whether it can be overridden is another matter).
    – DocRoot
    Oct 8 '16 at 10:27
1

So it turns out that my sql file got corrupted when exporting from phpmyadmin. Instead, I exported from command line with this command:

mysqldump -u [USER] -p [PASS] db-name > db-name.sql

Or if it's too large then you can zip it.

mysqldump -u [USER] -p [PASS] db-name | gzip > db-name.gz

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.