Jump to content

File upload problem for specific file name


Kennerd

Recommended Posts

Hi,

 

Hopefully someone can help me on this, we did a lot of testing but can't find an explanation for the following:

 

We have a document management system in PHP that writes it's documents (attachments) to a linux server, in a folder named after the id of the record in the mysql database. Here's the situation:

 

Document 123 has a folder named '123' with rights 755, and '123' contains 'att123.pdf'...

Document 1234 has a folder named '1234' with rights 755 and '1234' contains no attachments, however we tried to upload 'att1234.doc'...

 

Trying to opload 'att1234.doc' again fails... We do notice that the modified date of folder '1234' changes every time we try to do this...

 

We did the following tests:

  • Upload 'att1234.doc' in folder '123' --> works! (so the problem doesn't lie with the attachment, it lies in the folder '1234' ??)
  • Upload 'att123.pdf' in folder '1234' --> works! (so the doesn't lie with the folder '1234' ???
  • Upload 'att1234.doc' in folder '1234' after we succesfully uploaded 'att123.pdf'--> works! (what the hell ???  ;))

 

We are using the function move_uploaded_file(), but it does not return 'false'... We see no errors... It seems that the folder is 'corrupt' (possible??) for some reason and it becomes 'fixed' if we first upload a different attachment, and then re-upload the attachment that should have been uploaded the first time...

 

Addition: we also tried with renaming 'att1234.doc' to 'att1234xxx.doc' and this also works, so we don't really need to upload another attachment...

 

Any feedback, tips (solution! ;)), ... would be greatly appreciated.

 

Thanks!

Ken

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.