I was using phpmyadmin (Version information: 4.0.10deb1) on php 7.0.7 & nginx 1.4.6 . When I was trying to import a csv file to one of tables, I saw the max size allowed indicated on the phpmyadmin screen is 2,048KiB . Then I changed settings in php.ini (both /etc/php/7.0/fpm/php.ini & /etc/php/7.0/cli/php.ini):
upload_max_filesize = 150M
post_max_size = 150M
memory_limit = -1
max_execution_time = 5000
max_input_time = 5000
changed setting in /etc/nginx/nginx.conf:
client_max_body_size 150M;
and restarted nginx:
service nginx restart
but nothing changed. And the import would fail. How could I fix this issue? Thanks.
I checked with my DigitalOcean technical support and found out the reason: I restarted Nginx, but haven't restarted php-fpm which is the PHP process for Nginx.
After I tried service php7.0-fpm restart
, phpMyAdmin is showing (Max: 150MiB) for importing limit now. And the importing works!
You must change the mysql server settings too my.ini or my.cnf file by including the single line under [mysqld] section:
max_allowed_packet=500M
Then restart the MySQL server. In case of 500M is not enough use another value.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With