Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sun Aug 09, 2009 12:49 pm 
Offline

Joined: Sun Aug 09, 2009 12:25 pm
Posts: 1
Hi,

I'm having a very strange problem. I use lampp on centOS linux. My application has a upload Script (in PHP) which uploads file to file system. after upload and moving file to correct location, uploaded files are getting deleted. I check file upload and moving of file by putting all the status in a text log file. files are getting uploaded properly and after upload I'm able to move the files to it's correct location.

thanks,
Jitender Aryan

_________________
Jitender Aryan


Top
   
PostPosted: Sun Aug 09, 2009 2:00 pm 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
jitender.ind wrote:
after upload and moving file to correct location, uploaded files are getting deleted.

Which file is getting deleted?

(1) The file at the temporary location (before move)
(2) The file at the "correct" lcoation (after move)

If (1) is getting deleted, that's normal; that's what it means to "move" a file from one location to another. Even if you don't move it, the temporary file will be deleted at the end of the script.

If (2) is getting deleted, check your error logs to see if something is preventing the file from being saved properly. Is the location is writable by Apache? Is it subject to safe_mode or open_basedir restrictions?


Top
   
 Post subject:
PostPosted: Mon Aug 10, 2009 1:09 pm 
Offline
Senior Member
User avatar

Joined: Tue May 26, 2009 3:29 pm
Posts: 1691
Location: Montreal, QC
You're moving the files with move_uploaded_file(), right?

http://ca3.php.net/manual/en/function.m ... d-file.php


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group