LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-28-2006, 11:05 AM   #1
gmcmaster
Member
 
Registered: Feb 2003
Location: Poole, Dorset, England
Distribution: Fedora Core 5
Posts: 80

Rep: Reputation: 15
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
 
Old 04-28-2006, 01:09 PM   #2
gmcmaster
Member
 
Registered: Feb 2003
Location: Poole, Dorset, England
Distribution: Fedora Core 5
Posts: 80

Original Poster
Rep: Reputation: 15
Bumpity Bump?
 
Old 04-28-2006, 04:37 PM   #3
AdaHacker
Member
 
Registered: Oct 2001
Location: Brockport, NY
Distribution: Kubuntu
Posts: 384

Rep: Reputation: 32
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.
 
Old 04-28-2006, 04:39 PM   #4
gmcmaster
Member
 
Registered: Feb 2003
Location: Poole, Dorset, England
Distribution: Fedora Core 5
Posts: 80

Original Poster
Rep: Reputation: 15
hmm perhaps im not moving it away quickly enough. Ill have a fiddle. Cheers.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
limit Apache WebDAV uploads by file extension ahz10 Linux - Networking 0 04-25-2006 10:35 AM
PHP file uploads problem ... MikeFoo1 Programming 3 11-26-2004 02:53 PM
vsftp large file uploads fail randybell Linux - Newbie 2 09-28-2004 10:17 PM
php.ini and file uploads gblue Linux - Newbie 0 02-29-2004 05:28 PM
PHP: simplest way to limit uploads to upload directory J_Szucs Programming 3 11-11-2003 02:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration