I have changed all the php.ini parameters I know:
upload_max_filesize
, post_max_size
.
Why am I still seeing 2MB?
Answers
You probably didn't restart your server ;)
Or you modified the wrong
php.ini
.
Or you actually managed to do both ^^
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.
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:\wamp\apps\phpmyadminVERSION\config.inc.php
add this line at the end of the file BEFORE "?>":
$cfg['UploadDir'] = 'C:\wamp\sql';
save
create folder at
C:\wamp\sql
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:\wamp\sql folder.
This is how i did it:
- Locate in the
/etc/php5/apache2/php.ini
post_max_size = 8M upload_max_filesize = 2M
- 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
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 :)
I had the same problem. My Solution: go to /etc/phpmyadmin and edit apache.conf in the
<Directory>[...]</Directory>
section you can addphp_value upload_max_filesize 10M
php_value post_max_size 10M
Solved the problem for me!
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)
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.
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.
Simply, run this to find out which php.ini you need to edit.
<?php phpinfo();?>
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.
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
.
0 comments:
Post a Comment