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

Viewed 16083

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 ?

5 Answers

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.

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.

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

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

Related