Import file in MAMP(file size exceeded the maximum size permitted)

14,831

Solution 1

I did all these things but nothing happened.I have two files with the name "php.ini",the first is "php.ini-development" and the second is "php.ini-production".Because i don't know which is the correct file to change the values,i changed the values and at the two because my phpinfo have like a Loaded Configuration File this:"C:\MAMP\conf\php7.0.13\php.ini" and not one of the two.

Solution 2

Once you find out which version of PHP your MAMP is running, find the php.ini file at C:\MAMP\conf\php7.2.10\php.ini.

You'll need to change BOTH upload_max_filesize and post_max_size. If you only update the first, it'll default to the post_max_size.

Restart the MAMP and you should be good to go.

Solution 3

You need to edit the php.ini file for the php version you are using. i.e. v7.2.1. First check which version you're using by going to

MAMP-> Preferences -> PHP -> Select/Specify PHP Version

Then go to /Applications/MAMP/bin/php/php7.2.10/conf/php.ini and input the new settings there.

Stop your server and restart MAMP. Import should now run as expected.

Cheers.

Solution 4

First check your PHP version

enter image description here

then according to your php version you have to go this php version file (php.ini) and the change like below... :)

post_max_size = 256M

; Maximum allowed size for uploaded files.
upload_max_filesize = 256M

; 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 (8MB)
memory_limit = 512M

Solution 5

If you are seeing timeouts, you can increase max_execution_time and max_input_time.

Share:
14,831
George Kiritsis
Author by

George Kiritsis

Updated on June 14, 2022

Comments

  • George Kiritsis
    George Kiritsis almost 2 years

    I want to import a file(85 MB) at my local server.

    I changed in the php.ini the following values of the three variables (upload_max_filesize, memory_limit and post_max_size) exactly as I saw at same problems, with the right order, I restarted my MAMP server and my laptop but it didn't change anything and I can't import files more than 2 MB.

    Can you give any advise to fix it ?

  • omukiguy
    omukiguy almost 5 years
    However, change the post_max_size = 8M