LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   PHP File Uploads Failing (https://www.linuxquestions.org/questions/linux-software-2/php-file-uploads-failing-439719/)

gmcmaster 04-28-2006 11:05 AM

PHP File Uploads Failing
 
Hi there I am having a problem. I have a PHP File uploads script which, previously, has worked flawlessly. It stopped, saying the file was failing to upload, odd, I thought, the part of the script that copied the Temp upload file into a permanent location was failing to find the file.

So I created a dummy upload form pointing to a file with phpinfo(); in it to test and indeed the file is being uploaded. I uploaded a large file and you can see the byte value of the file increasing in /tmp, the temp file name is named something like PHP1gfn5, as soon as the upload completes and the page redirects onto the script for dealing with the upload the temp file promptly disappears.

I have tried increasing the max uploads size in php.ini with no affect and I have tried changing the upload directory with no affect, permissions are fine. So what could it be?

Thanks

gmcmaster 04-28-2006 01:09 PM

Bumpity Bump?

AdaHacker 04-28-2006 04:37 PM

Just a wild guess, but when you say "the page redirects onto the script" it sounds like you're posting the file to page X, and then redirecting to page Y to process it. But the PHP manual says that the "file will be deleted from the temporary directory at the end of the request if it has not been moved away or renamed," so after a redirect an unprocessed file is supposed to be deleted. Then again, without seeing the code I guess I can't know if that would even apply.

gmcmaster 04-28-2006 04:39 PM

hmm perhaps im not moving it away quickly enough. Ill have a fiddle. Cheers.


All times are GMT -5. The time now is 10:24 PM.