Server requirements for uploading large images I'm experiencing the problem that I can't upload large images. Very similar to this problem: Craft CMS max image resolution? But I couldn't solve the problem so far.

My first question is: Where do I have to place the php.ini so the upload script knows about it? (My web hosters help pages tell me to upload the file in every directory that need the ini files settings) I've tried /craft/app (next to index.php and Craft.php) and /htdocs (the web root).

Plus: I've tried to upload the exact same images to Craft at another web hoster where it works fine. But the limitations there are even stricter than where the problem occurs).

That means: if the location of the php.ini was right the values of post_max_size, memory_limit and max_execution_time are not the problem. Also it doesn't depend on the file size but on the image resolution.

image1.jpg | 703 x 951 pixels | ~850,000 Bytes &rarr; does work
image2.jpg | 2520 x 1680 pixels | ~750,000 Bytes &rarr; doesn't work
image2.jpg | save with same resolution as: "image3.jpg" &rarr; doesn't work
image2.jpg | save with lower resolution as: "image4.jpg" &rarr; does work

Does anyone know what else I could check to solve that problem?

Thanks for any help.
Where do I have to place the php.ini so the upload script knows about it?


In the same folder that Craft's public index.php lives in should be the only place it's required.

You can put a phpinfo.php in that same folder with the contents &lt;?php phpinfo(); and load that page in the browser to see if your php.ini changes have taken affect.


  Also it doesn't depend on the file size but on the image resolution.


That's because there isn't a 1:1 correlation because an images size on disk and how much RAM is required to load that image into memory.

post_max_size, memory_limit and max_execution_time and upload_max_filesize are usually the common culprits when dealing with uploading large files in PHP.