0

I am developing a web application which will allow the administrator to upload a file and its max size is 500M. I have changed the post_max_size = 500M and upload_max_filesize = 500M from 32M but the funny thing is that it does not allow me to upload files greater than 32M still. I have restarted the server and everything and still cant get to upload a large file. Is there any other setting i should change to allow me to upload the file? I am not going to process the file in memory but move it to the tmp folder and than process from there with move_uploaded_file so memory_limit i am assuming that is not going to be affected.

It is a simple form and as i recall if the limit is exceeded in the $_FILES superglobal array i should see something in the error element of the array but instead i get an empty array.

EDIT: I am modifying the php.ini settings but from phpinfo i am still getting the sizes of 32MB. And the php error log says that obviously i am exceeding 32MB

Can you please help me out. Thanks

Combinu
  • 882
  • 2
  • 10
  • 31
  • 1
    in a file echo phpinfo(); so check your changes in ini happened or not ? – babak faghihian Oct 18 '15 at 08:34
  • Possible duplicate of [How to upload large files above 500MB in PHP](http://stackoverflow.com/questions/16102809/how-to-upload-large-files-above-500mb-in-php) – Mubin Oct 18 '15 at 08:36
  • I forgot about phpinfo. No it is not taking the limits and i am modifying the correct ini file. Can these be set with ini_set()? – Combinu Oct 18 '15 at 08:52

2 Answers2

0

Chech phpinfo() on a web page, see which php.ini is loaded. You could be editing the wrong file.

Sometimes different ini files get loaded for command line and apache server use

Nenad Mitic
  • 577
  • 4
  • 12
  • I checked it and i get these `Configuration File (php.ini) Path /Applications/MAMP/bin/php/php5.5.18/conf Loaded Configuration File /Library/Application Support/appsolute/MAMP PRO/conf/php.ini` Both are modified with textEdit i dont know why i am not getting the modification – Combinu Oct 18 '15 at 15:01
0

I fount out what the problem is:

I am using MAMP as a developing server and MAMP has templates which override the original every time the server starts (a stupid thing IMO) so you need to change the template for it to take effect!

The template can be found under /Applications/Mamp Pro/Contents/Resources And there many php ini files for every version will be found. Hope this helps to the next one!

Combinu
  • 882
  • 2
  • 10
  • 31