Upon experimenting I have found the following results:
create content image results today:
274Kb file and smaller uploads to files/images/temp makes preview & thumbnail in /temp directory and in files/images and are promoted to front page.
447Kb, 479Kb, 740Kb and 989Kb files uploads to files/images/temp but do not show or create errors in the log.
1483Kb file uploads to files/images/temp makes preview & thumbnail in /temp and in files/images directory and is promoted to front page.
2495Kb file creates error in log:
Invalid argument supplied for foreach() in /home/machin/machinemaster-www/member/modules/image/image.module on line 316.
Does not load file in /temp but creates blank content and promotes the title to front page with no image then creates error in log:
Cannot modify header information - headers already sent by (output started at /home/machin/machinemaster-www/member/includes/common.inc:384) in /home/machin/machinemaster-www/member/includes/common.inc on line 192.
All of the files that do upload are in the /temp directory and only the ones that show up are in the files/images directory.
The files in the /temp directory don't get deleted when you edit/delete the content so the /temp directory will keep everything ever loaded causing deleted files that are reloaded to be incremented.
phpinfo() on my site:
memory_limit= 18388608
post_max_size= 8M
upload_max_filesize= 2097152
I have no explanation for why the 1483Kb file loads but I have even deleted the database, recreated it and got the same results.
Comments
Comment #1
Darrell commentedMore testing shows that in Firefox 1.0.7 no errors are generated untill 2+Mb images are attempted.
In IE6 with any of the images that load into /images/temp but are not loaded into /images you get a 404 page with the address of: /node/add/image. If you renew the page in IE6 you are back to the add image page.
Drupal never deletes anything out of /images/temp. The directory /temp should be empty as soon as the image, image.preview and image.thumbnail are created in /images or the process fails.
Comment #2
Robrecht Jacques commentedThanks for your testing.
image.module deletes the temp files, if they are older than 6 hours, using the cron hook. Read the installation instructions of Drupal how to enable the cron.
The /temp directory can't always be emptied because you can upload an image, do a preview (which will create the temp files) and then cancel the action. There is no way (that I know off) that image.module can then delete the temp files.
You are right that deleting the temp files on submit would be possible, but since we need to have a cron hook anyway for the reason above, we don't do that. If you could provide a patch for this, maybe we can discuss it further.
I have no idea about the errors you are seeing, but I'll look into it next week.
Comment #3
drewish commentedThis version is no longer supported. If this issue is occurring with a more recent version please open a new issue.