Как изменить максимальный размер phpmyadmin

Доброго времени суток! Сегодня мы вновь коснемся вопросов переезда с сервера на сервер и тех проблем, которые могут возникнуть в процессе этого. Речь пойдет о переносе баз данных и о тех особенностях конфигурации серверов, которые могут "всплыть" при работе в phpMyAdmin. Вводная часть Начну с лирического отступления. Когда я только начинал свою более-менее профессиональную деятельность в

Доброго времени суток! Сегодня мы вновь коснемся вопросов переезда с сервера на сервер и тех проблем, которые могут возникнуть в процессе этого.

Речь пойдет о переносе баз данных и о тех особенностях конфигурации серверов, которые могут «всплыть» при работе в phpMyAdmin.

Вводная часть

Начну с лирического отступления. Когда я только начинал свою более-менее профессиональную деятельность в WEB-разработке, мне казалось логичным и единственно верным правило: новый сайт — это всегда новая база данных. Что же здесь непонятного? Все с чистого листа. Зачем тянуть за собой уже существующие таблицы данных? В ответ на это системный администратор, который входил в команду работающую над рядом интернет-проектов, всегда тяжело вздыхал, иногда сильно ругался и рассказывал о префиксах таблиц. В общем, выбить новую базу данных было тяжело. Почти невозможно. Меня это очень даже раздражало, раздражало до степени бешенства.

Не понимал я подхода администратора сервера ровно до того момента пока мне не пришлось столкнуть с переносом двух десятков сайтов с одного сервера на другой. При этом ряд интернет-ресурсов использовали сразу несколько баз данных. В общем, осознал и встал на путь исправления. Подход изменился. Теперь я группирую различные проекты по 3-5 базам данных, что значительно упрощает жизнь. Объем каждой базы данных больше, но количество самих баз — значительно меньше.

Сразу скажу, что значительный объем базы данных может быть вызван всего одним единственным интернет-ресурсом. С такой ситуацией сталкиваюсь часто и обязательно беру ее в расчет. Так в чем же могут возникнуть проблемы с переносом баз данных? Переходим к практической составляющей.

Максимальный размер файла 2048 килобайт

Как правило, именно таким бывает стандартное ограничение для импорта существующей базы данных.

PMA как бы намекает… Бекапы более 2 мегабайт — не принимаются

Как вы уже могли догадаться, базу данных можно загнать в архив с расширением .gzip, .bzip2 или .zip, закрыв тем самым вопрос. Однако удается это далеко не всегда. Проще говоря, попытка архивации damp.sql, размеров в 100 МБ не принесет желаемого результата. Но мы попробуем, бегло проверив насколько возможно сжать базу тем или иным архиватором.

Архивация баз данных

Немного экспериментальной части.

В нашем распоряжении бекап с расширением .sql размером ~100 МБ. Что же нам даст архивация?

Формат Объем после сжатия
 .gzip  ~18 МБ
 .bzip2  ~ 13.5 МБ
 .zip  ~ 17.8 МБ

Результаты были получены в десктопном архиваторе 7zip. Конфигурация стандартная.

Эксперимент завершен. Результаты сжатия замечательны, но недостаточны для решения поставленной задачи.

Примечание: увеличение уровня компрессии и прочие настройки могут дать более значительные результаты, однако для чистоты эксперимента мы рассматривали сугубо стандартные настройки.

Как снять ограничения

Понимая, что задача не решается на уровне файла, приступим к решению на уровне сервера. Здесь есть как минимум два способа.

Первый, он же классический. Редактирование файла php.ini, как правило, путь к файлу следующий: /etc/php5/apache2.

Отредактировать данный файл можно как с помощью консоли, так и с помощью ISPmanager, либо любой другой панели управления.

Интересовать нас будут 2 параметра:

  • upload_max_filesize — максимальный размер загружаемого файла
  • post_max_size — максимальный размер сообщения методом POST.

Я установил оба параметра равным 200 МБ. Перезапускаем FPM (FastCGI Process Manager) командой service php5-fpm restart. Кстати, сделать все тоже самое можно через интерфейс ISPmanager:

ISPmanager: настройки PHP

Готово. Размер импортируемого файла увеличен.

Альтернативный подход: импорт файла из папки

Редактируем файл /etc/phpmyadmin/config.inc.php. Нас будет интересовать параметр $cfg['UploadDir']. Здесь мы должны указать путь к папке, в которой расположены бекапы баз данных. Заглянем в Импорт phpMyAdmin, появился новый пункт:

Важно! Не все йогурты одинаково полезны. Далеко не к каждой директории у phpMyAdmin есть права доступа!
Рекомендую использовать /usr/share/название_папки/.

Готово. Можно импортировать.

Вот в общем-то и все. Желаю Вам успешных переездов и только надежных серверов. До новых встреч.

Does anyone know if or how you can increase the import size limit in phpMyAdmin? Currently my server is limited to 50MB.

Please note that this is not the same as the upload_max_filesize in php.ini. That value is set to 2MB.

I need to import a table into one of my DBs and the phpMyAdmin restriction of 50MB on the import is preventing me from doing that.

Thanks.

Amended — attached are 2 screen shots:

Screen Shot #1 — phpinfo() showing the php.ini settings.
enter image description here
Screen Shot #2 — showing the phpMyAdmin import restriction
enter image description here

asked Oct 3, 2012 at 11:45

H. Ferrence's user avatar

H. FerrenceH. Ferrence

7,78631 gold badges96 silver badges160 bronze badges

0

If you are using WHM/Cpanel then in order to change that «Max: 50MiB» limit in the import section of phpmyadmin, you will have to change two values in WHM (Web Host Manager).

Step 1) Go to Tweak settings, find the «cPanel PHP Max upload size» change it according to your needs. Save changes.

Step 2) Go to Tweak settings, find the «cPanel PHP Max POST size» change it according to your needs. Save changes.

Go back to your phpMyadmin. The value should have changed.

enter image description here

enter image description here

enter image description here

answered Oct 17, 2013 at 8:09

Sharky's user avatar

SharkySharky

6,0563 gold badges39 silver badges70 bronze badges

1

I had the same problem with my working correctly by doing the following

changes into the php.ini file

post_max_size = 800M 
upload_max_filesize = 800M 
max_execution_time = 5000 
max_input_time = 5000 
memory_limit = 1000M 

now restart for the changes to take effect

answered May 8, 2014 at 17:01

Edy Aguirre's user avatar

Edy AguirreEdy Aguirre

2,07320 silver badges20 bronze badges

2

Could you also increase post_max_size and see if it helps?

Uploading a file through an HTML form makes the upload treated like any other form element content, that’s why increasing post_max_size should be required too.

Update : the final solution involved the command-line:

To export only 1 table you would do

mysqldump -u user_name -p your_password your_database_name your_table_name > dump_file.sql

and to import :

mysql -u your_user -p your_database < dump_file.sql 

‘drop table your_tabe_name;’ can also be added at the top of the import script if it’s not already there, to ensure the table gets deleted before the script creates and fill it

answered Oct 3, 2012 at 11:53

mbarthelemy's user avatar

mbarthelemymbarthelemy

12.2k4 gold badges40 silver badges42 bronze badges

16

Change these values in php.ini

post_max_size = 750M 
upload_max_filesize = 750M 
max_execution_time = 5000 
max_input_time = 5000 
memory_limit = 1000M 

Then restart Wamp for the changes to take effect. It will take some time. If you get following error:

Script timeout passed if you want to finish import please resubmit same zip file and import will resume.

Then update the phpMyAdmin configuration, at phpMyAdminlibrariesconfig.default.php

/**
 * maximum execution time in seconds (0 for no limit)
 *
 * @global integer $cfg['ExecTimeLimit']
 */
$cfg['ExecTimeLimit'] = 0;

answered Jul 7, 2015 at 10:53

Abey's user avatar

AbeyAbey

1,40811 silver badges25 bronze badges

I had the same problem. My .sql file was 830 MB and the phpMyAdmin import size allowed was 50MB (just as shown in the screenshot). When I zipped the file to .zip its size became about 80 MB. Then I zipped it to bzip2 format, and I was amazed to see that the file size was compressed to just 12MB (from 830MB to 12MB!!!). As phpMyAdmin allows three compression types i.e. .zip , .gzip and .bzip2 , therefore I uploaded the compressed bzip2 file and viola…. it was imported to the database!!! So by using the right compression, I was able to import a 830MB .sql file into phpMyAdmin.

NOTE: phpMyAdmin import page clearly instructs that the compressed filename should be like filename.sql.bz2 . It should not be like filename.bz2 .

NOTE 2: You can compress your .sql file to bzip2 compressed file using 7-Zip software. cPanel also has an option to compress a file to bzip2 format.

answered Nov 29, 2013 at 6:56

Irfan Ullah Khan's user avatar

1

First you have to change values in php.ini file as per your requirements.

post_max_size = 1024M 
upload_max_filesize = 1024M 
max_execution_time = 3600
max_input_time = 3600 
memory_limit = 1024M 

Note — Change these values carefully. These values will impact for all of your projects of that server.

Now, If above solutions are not working, kindly check your phpmyadmin.conf file.
If you are using WAMP so you can find the file in «C:wamp64alias».

You have to change below values.

Values already in file are —

  php_admin_value upload_max_filesize 128M
  php_admin_value post_max_size 128M
  php_admin_value max_execution_time 360
  php_admin_value max_input_time 360

Change above code to —

#  php_admin_value upload_max_filesize 128M
#  php_admin_value post_max_size 128M
#  php_admin_value max_execution_time 360
#  php_admin_value max_input_time 360

Now just restart your server, to work with changed values. :)

answered Feb 24, 2017 at 10:26

Ankit Shrivastava's user avatar

this is due to file size import limit in phpmyadmin, default is very low, so you should increase upload_max_filesize
you can change this in your php.ini, replaced with this

upload_max_filesize = 100M

answered Apr 24, 2015 at 2:26

ramird23's user avatar

ramird23ramird23

771 silver badge2 bronze badges

0

You can increase the limit from php.ini file. If you are using windows, you will the get php.ini file from C:xamppphp directory.

Now changes the following lines & set your limit

post_max_size = 128M
upload_max_filesize = 128M 
max_execution_time = 2000
max_input_time = 3000
memory_limit = 256M

If you have direct root SSH access to the machine you will be able to change the settings in:
/usr/local/cpanel/3rdparty/etc/phpmyadmin/php.ini

Just change the line:
upload_max_filesize = 50M

answered Jun 6, 2013 at 17:16

tibasce's user avatar

1

if you’re using xampp, find the php.ini (in xampp folder itself), go to line 735 and change the post_max_size to the value you wish.
ex: if you want to upgrade to 80MiB,

post_max_size = 80M

make sure to restart apache after changing the value.

That’s it…

answered Nov 19, 2013 at 22:18

Randika's user avatar

RandikaRandika

1391 silver badge2 bronze badges

1

Change the file phpmyadmin.conf on c:/wamp64/alias/phpmyadmin.conf

php_admin_value upload_max_filesize 512M
php_admin_value post_max_size 512M
php_admin_value max_execution_time 360
php_admin_value max_input_time 360

It’s very important you increase the time to 5000 or higher, Thus, the process will not stop when you are uploading a large file.

That works for me.

answered Mar 13, 2017 at 22:22

João Paulo Santarém's user avatar

go to your cpanel and search «ini editor». You’ll get «Multiphp INI Editor»
There you select your wordpress directory and put
upload_max_filesize = 256M
post_max_size = 256M
memory_limit = 256M

enter image description here

answered Sep 4, 2018 at 6:13

rushabhpathak's user avatar

Be sure you are editing php.ini not php-development.ini or php-production.ini, php.ini file type is Configuration setting and when you edit it in editor it show .ini extension. You can find php.ini here: xampp/php/php

Then

upload_max_filesize = 128M
post_max_size = 128M
max_execution_time = 900
max_input_time = 50000000
memory_limit = 256M

enter image description here]

answered Mar 29, 2019 at 16:21

Muhammad Usman's user avatar

1:nano /etc/php5/apache2/php.ini
you can find your php.ini location by uploading a file called phpinfo.php with the following contents<?php phpinfo();?> and access it by visiting yourdomain.com/phpinfo.php ,you will see the results

2:change the desired value to upload_max_filesize and post_max_size
such as :
upload_max_filesize = 200M
post_max_size = 300M
then it will become 200M.

3:restart your apache

answered Dec 30, 2016 at 12:00

bestshop24h's user avatar

bestshop24hbestshop24h

1112 silver badges8 bronze badges

IF YOU ARE USING NGINX :

  1. cd /etc/php/<PHP_VERSION>/fpm example => cd /etc/php/7.2/fpm

  2. nano php.ini

    post_max_size = 1024M 
    upload_max_filesize = 1024M 
    max_execution_time = 3600 
    max_input_time = 3600 
    memory_limit = 1024M 
    
  3. after saving php.ini file , restart fpm using :

    systemctl restart php<PHP_VERSION>-fpm
    

example => systemctl restart php7.2-fpm

answered Nov 30, 2020 at 7:05

Saurabh Mistry's user avatar

Saurabh MistrySaurabh Mistry

12.2k4 gold badges47 silver badges67 bronze badges

I increased the max file size by going to CPanel > Select PHP version > Switch to PHP Extensions and then scroll to the upload_max_filesize field (it will have a clickable link for the size — mine was set at 2MB) and I increased it to 256MB. Then click «Save».

answered May 18, 2015 at 8:39

Heath's user avatar

You Can Search php.ini file in C:xampphtdocs

changes into the php.ini file

post_max_size = 805M 
upload_max_filesize = 805M 
max_execution_time = 5005 
max_input_time = 5005 
memory_limit = 1005M 

After editing Please restart XAMPP

answered Oct 19, 2016 at 6:35

Sujiraj R's user avatar

Sujiraj RSujiraj R

1,4841 gold badge12 silver badges4 bronze badges

On newer version of cpanel: search ini

Select the Home Directory

Scrool down to 'upload_max_filesize’ and edit it…then save[enter
enter image description here

answered May 16, 2017 at 13:32

Mwangi Thiga's user avatar

Mwangi ThigaMwangi Thiga

1,31919 silver badges22 bronze badges

Sharky’s answer was spot on. The phpMyAdmin upload file size displayed is NOT managed by the php.ini settings, which you can see when you run a phpinfo.php containing:

<?php
// Show all information, defaults to INFO_ALL
phpinfo();
?>

It is good practice to increase your php.ini settings for:

post_max_size
upload_max_filesize
max_execution_time
max_input_time
memory_limit

You may use the settings example that Sujiraj R shared. Once you have made all of the changes to both your php.ini AND in the»Tweak Settings» area of WHM, when you launch phpMyAdmin and go to the import screen, you will see the size you selected for «cPanel PHP max upload size» field.

There were a lot of good answers on this post, but you had to look back and forth to get the right answer. I hope that by encapsulating those previous answers in this post I have helped just a bit. All of the answers I refer to on this post were derived by others that posted here, so please do not credit me with any of the answers posted herein.

answered Oct 9, 2017 at 19:04

Edwin Martinez's user avatar

If you don’t want to change the upload size limit, or for some reason can not change the upload size limit, compressing the database to a zip or tar.bz2 will really reduce the size of your database. In my case it went from 60MB which was >10MB over the limit, and compressed to a zip it was only 18MB!

answered Dec 20, 2022 at 11:36

Thomas Melak's user avatar

1

Does anyone know if or how you can increase the import size limit in phpMyAdmin? Currently my server is limited to 50MB.

Please note that this is not the same as the upload_max_filesize in php.ini. That value is set to 2MB.

I need to import a table into one of my DBs and the phpMyAdmin restriction of 50MB on the import is preventing me from doing that.

Thanks.

Amended — attached are 2 screen shots:

Screen Shot #1 — phpinfo() showing the php.ini settings.
enter image description here
Screen Shot #2 — showing the phpMyAdmin import restriction
enter image description here

asked Oct 3, 2012 at 11:45

H. Ferrence's user avatar

H. FerrenceH. Ferrence

7,78631 gold badges96 silver badges160 bronze badges

0

If you are using WHM/Cpanel then in order to change that «Max: 50MiB» limit in the import section of phpmyadmin, you will have to change two values in WHM (Web Host Manager).

Step 1) Go to Tweak settings, find the «cPanel PHP Max upload size» change it according to your needs. Save changes.

Step 2) Go to Tweak settings, find the «cPanel PHP Max POST size» change it according to your needs. Save changes.

Go back to your phpMyadmin. The value should have changed.

enter image description here

enter image description here

enter image description here

answered Oct 17, 2013 at 8:09

Sharky's user avatar

SharkySharky

6,0563 gold badges39 silver badges70 bronze badges

1

I had the same problem with my working correctly by doing the following

changes into the php.ini file

post_max_size = 800M 
upload_max_filesize = 800M 
max_execution_time = 5000 
max_input_time = 5000 
memory_limit = 1000M 

now restart for the changes to take effect

answered May 8, 2014 at 17:01

Edy Aguirre's user avatar

Edy AguirreEdy Aguirre

2,07320 silver badges20 bronze badges

2

Could you also increase post_max_size and see if it helps?

Uploading a file through an HTML form makes the upload treated like any other form element content, that’s why increasing post_max_size should be required too.

Update : the final solution involved the command-line:

To export only 1 table you would do

mysqldump -u user_name -p your_password your_database_name your_table_name > dump_file.sql

and to import :

mysql -u your_user -p your_database < dump_file.sql 

‘drop table your_tabe_name;’ can also be added at the top of the import script if it’s not already there, to ensure the table gets deleted before the script creates and fill it

answered Oct 3, 2012 at 11:53

mbarthelemy's user avatar

mbarthelemymbarthelemy

12.2k4 gold badges40 silver badges42 bronze badges

16

Change these values in php.ini

post_max_size = 750M 
upload_max_filesize = 750M 
max_execution_time = 5000 
max_input_time = 5000 
memory_limit = 1000M 

Then restart Wamp for the changes to take effect. It will take some time. If you get following error:

Script timeout passed if you want to finish import please resubmit same zip file and import will resume.

Then update the phpMyAdmin configuration, at phpMyAdminlibrariesconfig.default.php

/**
 * maximum execution time in seconds (0 for no limit)
 *
 * @global integer $cfg['ExecTimeLimit']
 */
$cfg['ExecTimeLimit'] = 0;

answered Jul 7, 2015 at 10:53

Abey's user avatar

AbeyAbey

1,40811 silver badges25 bronze badges

I had the same problem. My .sql file was 830 MB and the phpMyAdmin import size allowed was 50MB (just as shown in the screenshot). When I zipped the file to .zip its size became about 80 MB. Then I zipped it to bzip2 format, and I was amazed to see that the file size was compressed to just 12MB (from 830MB to 12MB!!!). As phpMyAdmin allows three compression types i.e. .zip , .gzip and .bzip2 , therefore I uploaded the compressed bzip2 file and viola…. it was imported to the database!!! So by using the right compression, I was able to import a 830MB .sql file into phpMyAdmin.

NOTE: phpMyAdmin import page clearly instructs that the compressed filename should be like filename.sql.bz2 . It should not be like filename.bz2 .

NOTE 2: You can compress your .sql file to bzip2 compressed file using 7-Zip software. cPanel also has an option to compress a file to bzip2 format.

answered Nov 29, 2013 at 6:56

Irfan Ullah Khan's user avatar

1

First you have to change values in php.ini file as per your requirements.

post_max_size = 1024M 
upload_max_filesize = 1024M 
max_execution_time = 3600
max_input_time = 3600 
memory_limit = 1024M 

Note — Change these values carefully. These values will impact for all of your projects of that server.

Now, If above solutions are not working, kindly check your phpmyadmin.conf file.
If you are using WAMP so you can find the file in «C:wamp64alias».

You have to change below values.

Values already in file are —

  php_admin_value upload_max_filesize 128M
  php_admin_value post_max_size 128M
  php_admin_value max_execution_time 360
  php_admin_value max_input_time 360

Change above code to —

#  php_admin_value upload_max_filesize 128M
#  php_admin_value post_max_size 128M
#  php_admin_value max_execution_time 360
#  php_admin_value max_input_time 360

Now just restart your server, to work with changed values. :)

answered Feb 24, 2017 at 10:26

Ankit Shrivastava's user avatar

this is due to file size import limit in phpmyadmin, default is very low, so you should increase upload_max_filesize
you can change this in your php.ini, replaced with this

upload_max_filesize = 100M

answered Apr 24, 2015 at 2:26

ramird23's user avatar

ramird23ramird23

771 silver badge2 bronze badges

0

You can increase the limit from php.ini file. If you are using windows, you will the get php.ini file from C:xamppphp directory.

Now changes the following lines & set your limit

post_max_size = 128M
upload_max_filesize = 128M 
max_execution_time = 2000
max_input_time = 3000
memory_limit = 256M

If you have direct root SSH access to the machine you will be able to change the settings in:
/usr/local/cpanel/3rdparty/etc/phpmyadmin/php.ini

Just change the line:
upload_max_filesize = 50M

answered Jun 6, 2013 at 17:16

tibasce's user avatar

1

if you’re using xampp, find the php.ini (in xampp folder itself), go to line 735 and change the post_max_size to the value you wish.
ex: if you want to upgrade to 80MiB,

post_max_size = 80M

make sure to restart apache after changing the value.

That’s it…

answered Nov 19, 2013 at 22:18

Randika's user avatar

RandikaRandika

1391 silver badge2 bronze badges

1

Change the file phpmyadmin.conf on c:/wamp64/alias/phpmyadmin.conf

php_admin_value upload_max_filesize 512M
php_admin_value post_max_size 512M
php_admin_value max_execution_time 360
php_admin_value max_input_time 360

It’s very important you increase the time to 5000 or higher, Thus, the process will not stop when you are uploading a large file.

That works for me.

answered Mar 13, 2017 at 22:22

João Paulo Santarém's user avatar

go to your cpanel and search «ini editor». You’ll get «Multiphp INI Editor»
There you select your wordpress directory and put
upload_max_filesize = 256M
post_max_size = 256M
memory_limit = 256M

enter image description here

answered Sep 4, 2018 at 6:13

rushabhpathak's user avatar

Be sure you are editing php.ini not php-development.ini or php-production.ini, php.ini file type is Configuration setting and when you edit it in editor it show .ini extension. You can find php.ini here: xampp/php/php

Then

upload_max_filesize = 128M
post_max_size = 128M
max_execution_time = 900
max_input_time = 50000000
memory_limit = 256M

enter image description here]

answered Mar 29, 2019 at 16:21

Muhammad Usman's user avatar

1:nano /etc/php5/apache2/php.ini
you can find your php.ini location by uploading a file called phpinfo.php with the following contents<?php phpinfo();?> and access it by visiting yourdomain.com/phpinfo.php ,you will see the results

2:change the desired value to upload_max_filesize and post_max_size
such as :
upload_max_filesize = 200M
post_max_size = 300M
then it will become 200M.

3:restart your apache

answered Dec 30, 2016 at 12:00

bestshop24h's user avatar

bestshop24hbestshop24h

1112 silver badges8 bronze badges

IF YOU ARE USING NGINX :

  1. cd /etc/php/<PHP_VERSION>/fpm example => cd /etc/php/7.2/fpm

  2. nano php.ini

    post_max_size = 1024M 
    upload_max_filesize = 1024M 
    max_execution_time = 3600 
    max_input_time = 3600 
    memory_limit = 1024M 
    
  3. after saving php.ini file , restart fpm using :

    systemctl restart php<PHP_VERSION>-fpm
    

example => systemctl restart php7.2-fpm

answered Nov 30, 2020 at 7:05

Saurabh Mistry's user avatar

Saurabh MistrySaurabh Mistry

12.2k4 gold badges47 silver badges67 bronze badges

I increased the max file size by going to CPanel > Select PHP version > Switch to PHP Extensions and then scroll to the upload_max_filesize field (it will have a clickable link for the size — mine was set at 2MB) and I increased it to 256MB. Then click «Save».

answered May 18, 2015 at 8:39

Heath's user avatar

You Can Search php.ini file in C:xampphtdocs

changes into the php.ini file

post_max_size = 805M 
upload_max_filesize = 805M 
max_execution_time = 5005 
max_input_time = 5005 
memory_limit = 1005M 

After editing Please restart XAMPP

answered Oct 19, 2016 at 6:35

Sujiraj R's user avatar

Sujiraj RSujiraj R

1,4841 gold badge12 silver badges4 bronze badges

On newer version of cpanel: search ini

Select the Home Directory

Scrool down to 'upload_max_filesize’ and edit it…then save[enter
enter image description here

answered May 16, 2017 at 13:32

Mwangi Thiga's user avatar

Mwangi ThigaMwangi Thiga

1,31919 silver badges22 bronze badges

Sharky’s answer was spot on. The phpMyAdmin upload file size displayed is NOT managed by the php.ini settings, which you can see when you run a phpinfo.php containing:

<?php
// Show all information, defaults to INFO_ALL
phpinfo();
?>

It is good practice to increase your php.ini settings for:

post_max_size
upload_max_filesize
max_execution_time
max_input_time
memory_limit

You may use the settings example that Sujiraj R shared. Once you have made all of the changes to both your php.ini AND in the»Tweak Settings» area of WHM, when you launch phpMyAdmin and go to the import screen, you will see the size you selected for «cPanel PHP max upload size» field.

There were a lot of good answers on this post, but you had to look back and forth to get the right answer. I hope that by encapsulating those previous answers in this post I have helped just a bit. All of the answers I refer to on this post were derived by others that posted here, so please do not credit me with any of the answers posted herein.

answered Oct 9, 2017 at 19:04

Edwin Martinez's user avatar

If you don’t want to change the upload size limit, or for some reason can not change the upload size limit, compressing the database to a zip or tar.bz2 will really reduce the size of your database. In my case it went from 60MB which was >10MB over the limit, and compressed to a zip it was only 18MB!

answered Dec 20, 2022 at 11:36

Thomas Melak's user avatar

1

Find the file called: php.ini on your server and follow below steps

With apache2 and php5 installed you need to make three changes in the php.ini file. First open the file for editing, e.g.:

sudo gedit /etc/php5/apache2/php.ini

OR

sudo gedit /etc/php/7.0/apache2/php.ini

Next, search for the post_max_size entry, and enter a larger number than the size of your database (15M in this case), for example:

post_max_size = 25M

Next edit the entry for memory_limit and give it a larger value than the one given to post_max_size.

Then ensure the value of upload_max_filesize is smaller than post_max_size.

The order from biggest to smallest should be:

    memory_limit
    post_max_size
    upload_max_filesize

After saving the file, restart apache (e.g. sudo /etc/init.d/apache2 restart) and you are set.

Don’t forget to Restart Apache Services for changes to be applied.

ftrotter's user avatar

ftrotter

3,0662 gold badges36 silver badges52 bronze badges

answered Jul 25, 2012 at 9:03

Aditya P Bhatt's user avatar

Aditya P BhattAditya P Bhatt

21k18 gold badges83 silver badges104 bronze badges

6

You probably didn’t restart your server ;)

Or you modified the wrong php.ini.

Or you actually managed to do both ^^

answered Oct 18, 2010 at 11:29

NikiC's user avatar

9

Just change your php.ini(xampp/php/php.ini) file, it worked for me!

max_execution_time = 5000
max_input_time = 5000
memory_limit = 1000M
post_max_size = 750M
upload_max_filesize = 750M

And, don’t forget to restart Apache Module from XAMPP Control Panel.

answered Apr 5, 2015 at 14:15

ersks's user avatar

ersksersks

1,3792 gold badges15 silver badges23 bronze badges

2

Increase phpMyAdmin upload / import size

By default you get a 2mb limit of upload / import size in phpmyadmin. That makes it odd and highly impossible to import larger files. You can increase the allowed upload size of phpmyadmin by editing your server’s php.ini configuration file. Usually in servers like CentOs it is located at /etc/php.ini.

Step 1: Go to php.ini and find the following and change their values to something more higher than your database size. (In this example i have used 20mb).

upload_max_filesize = 20M

post_max_size = 20M

Step2 : Restart your apache service for this new change to take effect. Usually the command to restart apache would be

service httpd restart (CentOs) / service apache2 restart (ubuntu)

You can also restart directly from their path like

/etc/init.d/apache2 restart or /etc/init.d/httpd restart

If you are in a shared hosting and do not have root access or access to your php.ini configuration file, then the other way is to create a .htaccess file in your application root and add the following line

php_value upload_max_filesize 10M
php_value post_max_size 10M

If you were still not able to increase it, please send me an email for more detailed assistance.

answered Jan 30, 2013 at 20:03

Abu Fahim's user avatar

Abu FahimAbu Fahim

6415 silver badges2 bronze badges

2

For uploading large files through PHPMyAdmin, follow these steps:

Step 1: Open your php.ini file.

Step 2: Upgrading Memory Limit:

memory_limit = 750M

Step 3: Upgrading Maximum size to post:

post_max_size = 750M

Step 4: Upgrading Maximum file-size to upload:

upload_max_filesize = 1000M

Step 5: Upgrading Maximum Execution Time:

max_execution_time = 5000

Step 6: Upgrading Maximum Input Time:

max_input_time = 3000

Step 7: Restart your xampp control panel.

answered Jan 29, 2016 at 12:09

Check your all 3:

  • upload_max_filesize
  • memory_limit
  • post_max_size

in the php.ini configuration file

* for those, who are using wamp @windows, you can follow these steps: *

Also it can be adapted to any phpmyadmin installation.

Find your config.inc.php file for PhpMyAdmin configuration (for wamp it’s here: C:wampappsphpmyadminVERSIONconfig.inc.php

add this line at the end of the file BEFORE «?>»:

$cfg['UploadDir'] = 'C:wampsql';

save

create folder at

C:wampsql 

copy your huge sql file there.

Restart server.

Go to your phpmyadmin import tab and you’ll see a list of files uploaded to c:wampsql folder.

answered Feb 7, 2015 at 9:59

Lukas Liesis's user avatar

Lukas LiesisLukas Liesis

23.4k10 gold badges109 silver badges108 bronze badges

0

With WAMP, on Windows10, open

c:wamp64aliasphpmyadmin.conf

and change 128 by 256 at the end of these lines

  php_admin_value upload_max_filesize 128M
  php_admin_value post_max_size 128M

Restart WAMP

answered Apr 18, 2019 at 21:39

gael's user avatar

gaelgael

7636 silver badges16 bronze badges

2

enter image description here

Open this file

edit these parameters:

  • memory_limit =128M
  • post_max_size = 64M
  • upload_max_filesize = 64M

Rakesh kumar Oad's user avatar

answered Aug 10, 2015 at 7:57

Karan Datwani's user avatar

1

This is how i did it:

  1. Locate in the /etc/php5/apache2/php.ini

    post_max_size = 8M
    upload_max_filesize = 2M
    
  2. Edit it as

    post_max_size = 48M
    upload_max_filesize = 42M
    

(Which is more then enough)

Restarted the apache:

sudo /etc/init.d/apache2 restart

Maxime Lorant's user avatar

answered Jun 9, 2014 at 6:33

Shashank Saxena's user avatar

None of the current answers will work for WHM / cPanel servers.

To increase the limit in WHM:

  1. Navigate to Server Configuration > Tweak Settings
  2. Choose the PHP tab
  3. Update «cPanel PHP max POST size» & «cPanel PHP max upload size» (POST size should be bigger)

answered Jun 25, 2015 at 7:54

Ben Wilde's user avatar

Ben WildeBen Wilde

5,4542 gold badges38 silver badges36 bronze badges

0

Ubuntu 20.04, 20.10, 22.04 and 22.10.

Well, with other distros as base Ubuntu as Xubuntu.

Edit : sudo nano /etc/php/7.4/apache2/php.ini

Search and modify : post_max_size = 120M and upload_max_filesize = 120M

Replace 120 with the value you need, e.g. 22M, etc.

Important, you have to change to the version of PHP that you have by default at that moment. Example with PHP 8.1: sudo nano /etc/php/8.1/apache2/php.ini

To check what version of PHP you have, just run php -v in your terminal.

answered Sep 20, 2021 at 7:05

Jatniel's user avatar

JatnielJatniel

1,2232 gold badges16 silver badges23 bronze badges

I had the same problem.
My Solution:
go to /etc/phpmyadmin and edit apache.conf
in the <Directory>[...]</Directory> section you can add

php_value upload_max_filesize 10M
php_value post_max_size 10M

Solved the problem for me!

Daniele Armanasco's user avatar

answered Jun 7, 2014 at 11:58

Maik's user avatar

MaikMaik

711 silver badge1 bronze badge

2

I found the problem and am post hete if anyone followed some blog post out there to create the sort of enviromment I have (win 7 host with ubuntu and zend server ce on virtual box).

The thing is that MySQL is running on Lighttpd, not under Apache. So I had to change the php.ini file under that webserver as well which is in the path:

/usr/local/zend/gui/lighttpd/etc/php-fcgi.ini

In the end, you were right about the files, of course, but I was wrong on what file I had to change :)

answered Oct 20, 2010 at 6:10

ronaldosantana's user avatar

ronaldosantanaronaldosantana

5,0724 gold badges22 silver badges28 bronze badges

1

C:xamppphpphp.ini in my case
or it could be C:phpphp.ini if the Apache / PHP / MySQL are stand alone

upload_max_filesize = 2M by default

so it can be changed as desired. And in my case
upload_max_filesize = 20M

post_max_size = 8M by default
it should be changed to post_max_size = 20M as well

memory_limit=128M is by default and it is not necessary to change to increase the max
2056kb or 2mb .sql file upload limit. But it only means that a script can consume up to 128 memory when you run apache and sql server , and if you change memory_limit=128M to higher and run any malfunctioned script then it may cause you trouble. So its up to you.

answered Oct 11, 2013 at 5:31

user2869677's user avatar

I had a problem with changing the upload size on my phpmyadmin and OS X 10.9.4 Mavericks.
At first I didn’t know where the php.ini is so used locate

locate php.ini

which came back with

/private/etc/php.ini.default
/usr/local/etc/php/5.4/php.ini

I’ve tried editing /usr/local/etc/php/5.4/php.ini and then restart in the server put this didn’t work.

I remembered that there is a better way to find out this file I’m looking for or and least where php is looking for php.ini.

<?php phpinfo() ?>

came back saying that it expects /etc/php.ini but I didn’t have one there. The below is from the phpinfo():

Configuration File (php.ini) Path: /etc

It turns out that the first result in the locate command above is what I’m looking for.

At least in OS X 10.9.4 Mavericks (OS X is something new to me) /etc is actually a link, etc -> private/etc, and by the looks of it PHP assumes default values unless php.ini is actually present.

I copied /private/etc/php.ini.default

cp /private/etc/php.ini.default /private/etc/php.ini

Then checked the variables in the new /etc/php.ini as per Aditya Bhatt advice above and it worked.
In my case the values were:

memory_limit =128M
post_max_size = 64M
upload_max_filesize = 64M

Obviously, the apache service has to be restarted to see the changes.

answered Aug 2, 2014 at 15:12

Bart C's user avatar

Bart CBart C

1,4292 gold badges15 silver badges17 bronze badges

 php_value upload_max_filesize 100M
    php_value post_max_size 100M

increse that size in php.ini then run command

sudo service apache2 restart
sudo service mysql restart

in xammp

restart all service

answered Feb 24, 2018 at 7:06

Ravindra Bhanderi's user avatar

2

How to import huge amount of Data in Xampp

It’s the best solution to open new, clean database, and import the file in phpMyAdmin. Choose file from local folder and leave all settings as is. That should be it.

But if your file exceeded file size of 2MB (that is default value in xampp installation) than you need to tweak some out. Basically we will just increase the maximum upload file size.

Open your xampp install folder and go to php folder. With some text editor file (notepad++) open the file called php.ini (by type windows describe it as configuration settings) and edit the line (cca. 770, or press ctrl+f in notepad++ to find it):

post_max_size = 2M

instead 2M, put wanted maximum file size (16MB for example but not higher than 128M),

after that go to this line:
max_execution_time = 30
instead 30, increase execution time that’s in seconds (90 for example), also you need to change this line:

max_input_time = 60

instead 60, increase input time in seconds (120 for example)
and top of all you have to change this line:

upload_max_filesize = 2M

instead of 2M, increase to 16M for example.
Save the file, restart apache and mysql in xampp and try to upload again, if you follow correctly you should be able to import files through 16MB (example)

answered Jun 6, 2014 at 8:21

user3714265's user avatar

You could just use MySQL administrator app or MySQL workbench.
Lightweight apps and you can export or import your entire server however the size.
Am late to the party here but I hope it helps someone.

answered Aug 22, 2015 at 13:23

Ahmad Tijani's user avatar

I had the same problem, My upload limit was 2 MB, I edited my php.ini, and I set it to 5 MB but still it was showing 2 MB even after restarting server. Than I compressed my .sql file to zip by keeping its name as xyz.sql.zip so it became 451 kb from 3.5 mb. Then I uploaded it again. It worked for me.

answered Dec 16, 2015 at 11:48

Ahmed Syed's user avatar

Ahmed SyedAhmed Syed

1,1691 gold badge18 silver badges44 bronze badges

0

I found that increasing the upload and post limit in php.ini did not affect the limit in phpmyadmin. This is because my server has a separate setting for cpanel upload limit. If you have access to WHM, you probably have this.

To adjust:

  • login to your WHM panel: this is usually located at {your server ip}/whm and you will need your root login details here. If you don’t have those, request them from your host.
  • once logged in, in the top left search bar, search for «tweak settings»
  • On the tweak setting pages, search for «cPanel PHP max upload size»
  • Adjust the number and save

No need to restart apache or anything, changes are instant. This process increased the value of max upload file size in phpmyadmin. You can check this by going to phpmyadmin and selecting your database, then clicking «import» at the top. Beside the file selector you will see the upload limit. My server default was 100.

answered Aug 26, 2013 at 7:24

FueledPublishing's user avatar

do the following things

  • increase upload_max_file_size in php.ini
  • gzip your sql file

and then import the file

answered Nov 11, 2015 at 8:16

Farhan's user avatar

FarhanFarhan

1,55114 silver badges12 bronze badges

I was facing the same problem where increasing max size in php.ini has no effect on wordpress and tried many solutions like -:

  1. Increase max size via functions.php
  2. Increase max size via .htaccess file.

The one that worked for me is adding max size in .htaccess file.
It wasn’t working with neither with php.ini file nor with functions.php file.

I just did add this code in .htaccess file and its done

php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300

NOTE: I did add above code in <IfModule> tag.

If php.ini file is not doing anything in changing size then try other 2 files for it and one of them will surely work for you.

READ THIS ARTICLE TO KNOW ABOUT ALL FILES IN WHICH YOU CAN INCREASE MAX SIZE

answered Dec 22, 2016 at 4:32

Rishabh's user avatar

RishabhRishabh

6102 gold badges11 silver badges31 bronze badges

0

I think if your php version is above 5.5, let say it is 5.6, then your php.ini file is in following folder

/etc/php/5.6/apache2

so you have to apply your changes like post_max_size, upload_max_filesize and memory_limit there.

Hope it will help you.

sandip's user avatar

sandip

5239 silver badges26 bronze badges

answered Jan 4, 2017 at 10:30

Vivek Parmar's user avatar

Vivek ParmarVivek Parmar

7631 gold badge10 silver badges26 bronze badges

I’ve tried all of the above and nothing worked for me: my phpmyadmin (on wamp) was still showing 128MiB (while I’ve needed to import DB which size was 212Mb)

so if U stucked as me you can import it with the help of commandline:

  1. run bash (cmd, powershell or whatever terminal) from folder where your .sql file is located (or cd that path in terminal)
  2. run mysql -u username -p database_name < file.sql where
    username — is username for mysql server
    database_name — is name of db you want import to
    file.sql — is name of your sql file

👍😉

for me just worked like a charm after 2hours of trying to manipulate this through php.ini and other configurational files 🙈👌

answered Aug 18, 2021 at 15:04

Able's user avatar

AbleAble

3662 silver badges4 bronze badges

1

Search for php.ini file

For xampp, you can get it @ C:xamppphp

Find the following 3 properties and set there value according to your need

memory_limit
post_max_size
upload_max_filesize

Restart Apache!

answered Sep 20, 2018 at 13:40

Debojyoti's user avatar

DebojyotiDebojyoti

4,3072 gold badges19 silver badges27 bronze badges

I am using Bitnami WAMP Stack 7.1.8-0 on my localhost. For me, the PHPMyAdmin maximum upload size limit was set to 80MiB as in the screenshot https://nimb.ws/fFxv7O. I managed to increase this size limit as explained below:

  1. Go to the folder where you have installed the Bitname WAMP Stack, for me, it is «E:Bitnami WAMP Stack”
  2. Further inside, go to the path “appsphpmyadminconf»
  3. Open the file httpd-app.conf in your favorite text editor
  4. Find the following two lines:
php_value upload_max_filesize 80M    
php_value post_max_size 80M

(The 80M value at the end of these lines may be different for you)

  1. Go ahead and change these values at the end of these two lines (80M in this case) according to your needs.

  2. Restart WAMP server.

Now go to PHPMyAdmin and see, your upload size limit should be updated to whatever you set it to. That is it.

answered Dec 11, 2019 at 7:35

Arif I.'s user avatar

Arif I.Arif I.

1,8651 gold badge15 silver badges13 bronze badges

Note: (added July 2020)

I’m surprised nobody else has mentioned this … changing php.ini should probably be your last resort when increasing file upload sizes to something as big as 64MB.

It may not matter greatly on development machines, but editing php.ini to globally increase max upload size could be a really bad idea on a server where you have several websites operating. MySQL imports to PHPMyAdmin are often large, but you don’t want every Tom, Dick and Mary uploading 64MB files to another site on your server because you need to do it every now and again for your MySQL database.

I’d suggest a better solution is therefore (assuming you are using the standard Apache PHP module) to edit the specific virtual host configuration for PHPMyAdmin.

On Ubuntu Linux, this is found in /etc/apache2/conf-enabled/
phpmyadmin.conf. On WAMP/Windows/Whatever you’ll need to look at the setup for your Apache configuration, but it will probably be in conf-enabled, conf.d, sites-enabled, or something like that. These are actually often just symlinks to the actual file which is located somewhere like /etc/phpmyadmin/apache.conf (again using Ubuntu as the example here).

Your apache.conf file will include lines something like this:

Alias /phpmyadmin /usr/share/phpmyadmin

<Directory /usr/share/phpmyadmin>
    Options SymLinksIfOwnerMatch
    DirectoryIndex index.php

    # limit libapache2-mod-php to files and directories necessary by pma
    <IfModule mod_php7.c> 
        php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
        php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext/:/usr/share/php/php-php-gettext/:/usr/share/javascript/:/usr/share/php/tcpdf/:/usr/share/doc/phpmyadmin/:/usr/share/php/phpseclib/:/usr/share/php/PhpMyAdmin/:/usr/share/php/Symfony/:/usr/share/php/Twig/:/usr/share/php/Twig-Extensions/:/usr/share/php/ReCaptcha/:/usr/share/php/Psr/Container/:/usr/share/php/Psr/Cache/:/usr/share/php/Psr/Log/:/usr/share/php/Psr/SimpleCache/
    </IfModule>

</Directory>

Immediately after <IfModule mod_php7.c> add these lines:

    php_value post_max_size 64M
    php_value upload_max_filesize 64M

Depending on your server config, you can probably achieve the same thing in an .htaccess file if you prefer. In which case you could just add the two lines by themselves (assuming you know for certain that PHP is enabled).

If you use fpm or fastcgi or something with or without Apache, the same more localized approach to controlling upload sizes can be achieved by using .user.ini files.

answered Jul 25, 2020 at 19:27

fred2's user avatar

fred2fred2

1,0052 gold badges9 silver badges28 bronze badges

3

Ubuntu 20.04:

Changing php.ini files and restarting apache was not enough, I had to also do this:

sudo service php7.4-fpm restart

answered Nov 14, 2022 at 22:18

quenn's user avatar

quennquenn

616 bronze badges

The first things to check (or ask your host provider to check) are the values of max_execution_time, upload_max_filesize, memory_limit and post_max_size in the php.ini configuration file. All of these three settings limit the maximum size of data that can be submitted and handled by PHP.

Please note that post_max_size needs to be larger than upload_max_filesize.

answered Feb 14, 2018 at 18:09

Mostafa Soufi's user avatar

Урок 126. Как в phpMyAdmin изменить допустимый размер загружаемой базы данных?

phpmyadmin

Привет!

Вот недавно решил создать на денвере дубликат одного из моих работающих сайтов в интернете. Сам процесс переноса сайта я затрагивать не буду, так как мы уже обсуждали его в данном уроке. Однако мы не говорили о том, что делать, если Ваша база данных весит больше 2-х мегабайт. Именно такая проблема у меня и встала. Моя база данных весила 17 мб, и phpMyAdmin никак не хотел ее импортировать, ибо максимально возможный размер загружаемой базы данных — не более 2 мб. Сегодня мы поговорим о том, как самому задать этот самый максимально допустимый размер.Все делается очень легко и быстро! Раз phpMyAdmin — всего лишь груда файлов, в нашем случае, на диске C, то логично предположить, что и изменить максимально допустимый размер импорта базы данных можно путем редактирования этих самых файлов. Даже одного файла!

Цель нашего поиска — файл php.ini. Не знаю, какой у Вас «джентльменский набор вебмастера», у меня он — Денвер. Поэтому у меня таких файлов аж 2 или 3 штуки. Но нужен лишь один.

Идем на диск Ц, там есть папка WebServers. Во всяком случае она там есть у меня, если Вы проходили данный урок, или же сами, при установке не меняли ничего, то и у Вас эта папка там же.

В данной папке ищем под папку usr. В этой папке лежит папка local, а в ней, в свою очередь, папка php5. А тут и расположен наш файл — php.ini.

Если кто-то запутался, то Вот мой полный путь до этого файла: C:WebServersusrlocalphp5.

Сам файл открываем любым текстовым редактором, будь то Dreamweaver или обычный, стандартный блокнот. Далее находите по очереди ниже приведенные строки, и меняйте их.

; Maximum allowed size for uploaded files.

upload_max_filesize = 200M

; Maximum size of POST data that PHP will accept.

post_max_size = 200M

; Maximum execution time of each script, in seconds

max_execution_time = 600

; Maximum amount of time each script may spend parsing request data

max_input_time = 600

; Maximum amount of memory a script may consume (128MB)

memory_limit = 500M

То есть,  находите строку upload_max_filesize , и меняете значение в ней, к примеру, на 200, как у меня указано. Можете хоть на 900. Разницы нет.

Вот собственно и весь урок! После изменения файла не забудьте сохранить его и перезагрузить денвер. Последнее является важным, так как я минут 10 не понимал, почему изменения не вступили в силу, пока не вспомнил, что это денвер, и его надо перезагружать после внесения изменений.

На этом у меня все, до скорых встреч!

P.S. Ну и по традиции, свежий выпуск фэйлов со всех стран мира 🙂

Портал > База знаний > Администрирование Linux > Как изменить максимальный размер загружаемой базы данных в PHPMyAdmin

    Так как PHPMyAdmin написана на языке PHP, все изменения производятся в конфигурационных файлах PHP.

    Рассмотрим как это сделать с помощью SSH на VDS и с помощью cpanel на shared-хостинге.

    

Настройка с помощью SSH

    Для изменения размера загружаемой базы данных необходимо отредактировать конфигурационный файл php.ini.

  Обычно он размещен в директории /etc/php5/apache2/php.ini (Debian/Ubuntu) или /etc/php.ini (/etc/httpd/conf.d/php.conf)  (CentOS/Fedora).

    Если в вышеуказанных директориях он отсутствует, создайте файл info.php со следующим содержимым:

    <?php
    phpinfo();
    ?>

    Разместите его в корневой директории сайта (не забудьте потом удалить). В браузере наберите URL Вашего сайта/info.php, например www.example.com/info.php:

    Находим директорию размещения конфигурационного файла:

    Для редактирования файла php.ini необходимо иметь привилегии root пользователя.    При подключении с помощью SSH используйте текстовый редактор nano:

    root@vmw:~# nano /etc/php.ini

    Отыскиваем параметры post_max_size и upload_max_filesize.     Устанавливаем значения по размеру файла необходимого для загрузки.

        Например:


    post_max_size = 300M
    ….
    upload_max_filesize = 300M»
    После редактирования php.ini сохраните конфигурационный файл и перезапустите веб-сервер.
    Для этого выполните команду от имени root пользователя:

    service apache2 restart #для  Debian/Ubuntu
    service httpd restart #для CentOS/Fedora

    Теперь проверим максимальный размер загружаемой базы данных в PHPMyAdmin:

Настройка с помощью cpanel

    Перейдите в раздел Программное обеспечение и выберите пункт Выбор версиии PHP:

    Затем выберите Перейти к опциям PHP:

    Для изменения размера загружаемых или выгружаемых баз данных выберите нужное значение в upload_max_filesize и post_max_size:

    Нажмите Применить и Сохранить.

Добавить в избранное Добавить в избранное    Распечатать статью Распечатать статью

Также читают

Установка Ioncube (просмотров: 531)

Powered by WHMCompleteSolution

I am not able to change the file size that phpmyadmin accepts for importing databases on my test server.

I have changed all values I have some idea about in my.cnf:

max_packet_size
Key_buffer

or the upload file size and
max_post_size value in every php.ini file I have found on the system.

The accepted file size on the import screen still remains 8,192kib.

Zanna's user avatar

Zanna

68.3k55 gold badges210 silver badges320 bronze badges

asked Jun 24, 2014 at 14:35

Josh's user avatar

1

To increase MySQL phpmyadmin import file size in Ubuntu 16.04 or newer, follow these steps. In the newest Ubuntu version you can have either PHP 5 or PHP 7.

Step — 1: open php.ini of the appropriate PHP version(s).

  • For PHP v5.0

    sudo -H gedit /etc/php5/apache2/php.ini
    
  • For PHP v7.0

    sudo -H gedit /etc/php/7.0/apache2/php.ini
    
  • For PHP v7.1

    sudo -H gedit /etc/php/7.1/apache2/php.ini
    
  • For PHP v7.2

    sudo -H gedit /etc/php/7.2/apache2/php.ini
    
  • For PHP v7.3

    sudo -H gedit /etc/php/7.3/apache2/php.ini
    

Step — 2: Now need to increase below parameters in the php.ini file.

memory_limit = 1500M

post_max_size = 1500M

upload_max_filesize = 1500M

Please Note : post_max_size should be larger than upload_max_size

Step — 3: Now you need to restart your apache server to effect changes.

sudo service apache2 restart

ibnɘꟻ's user avatar

answered Aug 18, 2017 at 19:53

Bhaskar Bhatt's user avatar

1

The first things to check (or ask your host provider to check) are the values of max_execution_time, upload_max_filesize, memory_limit and post_max_size in the php.ini configuration file. All of these three settings limit the maximum size of data that can be submitted and handled by PHP.

Please note that post_max_size needs to be larger than upload_max_filesize.

answered Feb 14, 2018 at 18:14

Mostafa Soufi's user avatar

  1. create info.php page and check all details about file

    <?php 
      phpinfo();
    ?>
    
  2. run in your browser search upload_max_filesize and post_max_size change by default value 2M to 80M.

  3. Run

    sudo -H gedit /etc/php5/apache2/php.ini
    
  4. change both values upload_max_filesize and post_max_size
    change by default value 2M to 80M

  5. Restart apache

    sudo /etc/init.d/apache2 restart
    

Zanna's user avatar

Zanna

68.3k55 gold badges210 silver badges320 bronze badges

answered Oct 10, 2016 at 14:07

Siddharth Shukla's user avatar

Set the variables upload_max_filesize, post_max_size, memory_limit in php.ini to the right values and restart the server, then it should work.
If it does not work, check with phpinfo() if you edited the right php.ini.

answered Jun 24, 2014 at 14:39

Pabi's user avatar

PabiPabi

7,3053 gold badges38 silver badges49 bronze badges

If In case you are using Virtualmin , Webmin or Usermin then

Follow below 2 steps as per image:
1.
step 1 image

2.
step 1 image

answered Dec 9, 2021 at 13:12

Manthan Patel's user avatar

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Как изменить максимальный заряд батареи на ноутбуке
  • Как изменить максимальную частоту процессора через реестр
  • Как изменить максимальную температуру процессора
  • Как изменить максимальную скорость интернета
  • Как изменить максимальную скорость gmod

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии