I have a script running which allows you to upload. I grab that image and I create 3 different sizes. What I do then is move the files into a directory to hold them all in there.
The problem I’m having is that move_uploaded_file() is returning false but it’s still moving them into the correct directory. I’m not sure why it’s doing that?
The variable strExtension is from an earlier validation I had done, which adds jpg, png or gif extension.
I’ve looked at the manual and the only explanation I could find is that every example always references the tmp_name array. But if that was the case, then just doing:
[list][]The MAX_FILE_SIZE item cannot specify a file size greater than the file size that has been set in the upload_max_filesize in the php.ini file. The default is 2 megabytes.
[]If a memory limit is enabled, a larger memory_limit may be needed. Make sure you set memory_limit large enough.
[*]If max_execution_time is set too small, script execution may be exceeded by the value. Make sure you set max_execution_time large enough.[/list]
Argh. This is so weird its still having problem uploading certain files.
I tried a 5mb file and it uploaded correct. Then I tried a 3.2MB and it just stalled out, no error message, no redirection. The browser progress bar reached 100% and nothing happened.
Then I tried a 2.0MB and it worked fine as well as a 4.3MB picture. In addition, I tried a 1.1MB picture and it stalled out too!
Have you mentioned yet where the trouble is occurring? Is it a server controlled by someone else? Do you have control over the server? What versions of apache and php is it running? Are you dealing with windows or linux? Is php running as suPHP or is it running as a restricted nobody account?
Things like that which might help someone here to help you.
Thanks for that. This issue you’re facing goes beyond what I can help with at this stage, but the information you have provided should allow someone else here to help you further.