liuwenzi / moovrelocator

Automatically exported from code.google.com/p/moovrelocator
Other
0 stars 0 forks source link

Permission denied error trying to unlink the input file after successful ->fix() #7

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Upload a file and write with 
move_uploaded_file($_FILES['Filedata']['tmp_name'], $new_file_name)
2. Set inputfile to $new_file_name
3. Set outputfile to 'new_'.$new_file_name
4. $result = $moovrelocator->fix()
5. @unlink($new_file_name)

What is the expected output? What do you see instead?
Expected output is 'new_'.$new_file_name is written and $new_file_name is 
deleted

What you get is a permission denied error after @unlink in error_get_last()

This suggests that a file handle is still open somewhere. @unlink successfully 
deletes previously uploaded file when page is re-run so it is not 
file/directory permissions etc...

What version of the product are you using? On what operating system?
v2.0

Please provide any additional information below.
We wish to use this in xerteonlinetoolkits... is this ok?

https://code.google.com/p/xerteonlinetoolkits/source/browse/#svn%2Ftrunk%2Fmodul
es%2Fxerte%2Fengine%2Ftools%2Fmoovrelocator

Original issue reported on code.google.com by jjs@gcu.ac.uk on 1 Jun 2013 at 2:33

GoogleCodeExporter commented 9 years ago
meant to say this is on Windows 7 running xampp

Original comment by jjs@gcu.ac.uk on 1 Jun 2013 at 2:34

GoogleCodeExporter commented 9 years ago
v0.2

Original comment by jjs@gcu.ac.uk on 1 Jun 2013 at 3:03