View Full Version : Error on upload
gpac357497
09-29-2009, 03:40 PM
I am getting the following error on file upload:
Warning: move_uploaded_file(/home/xxx/swf/MP1.swf) [function.move-uploaded-file]: failed to open stream: Permission denied in /home/xxx/WA_DigitalFilePro/HelperPHP.php on line 145
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpLnjYHl' to '/home/xxx/swf/MP1.swf' in /home/xxx/WA_DigitalFilePro/HelperPHP.php on line 145
The target directory permission has been set to "0766"
I have been through the plethora of similiar issues which all say to set the permissions correctly - which I have. Not "xxx" is for security protection.
I am using Digital File Pro 1.1.3
SOJO web
09-29-2009, 04:57 PM
Can you change the target directory permissions to either 0755 or 0777? I am not sure about your server, but those two are the only ones that work on mine.
Best regards,
Brian
gpac357497
09-29-2009, 07:47 PM
Thanks Brian,
Yes I have tried both. We use Cpanel on an ISP's server so it's easy to change settings. Elsewhere on the forum I read that php servers used a temporary area that they first loaded files to and I should set the priveledges there.
Note the error snippet "Unable to move '/tmp/phpLnjYHl' ". I also changed the settings on what I believe to be that tmp directory to no avail as well.
I have checked the documentation from WA and crawled the forum with know apparent fix.
I hope tht the support group at WA responds soon.
Gary
Jason Byrnes
09-30-2009, 09:18 AM
line 145 is trying to delete the temporary file that was created in the temp directory. Try setting the permissions on the temp directory to 0766.
You can also try changing line 145 of the WA_DigitalFilePro/HelperPHP.php file from:
unlink($attemptedServerFilePath);
to:
chmod($attemptedServerFilePath, 0766);
unlink($attemptedServerFilePath);
It is possible that the server is configured in a way that would not allow you to modify permissions on the temp folder, if you are still getting the same error with the correct permissions, you may need to work with the host to resolve the problem.
gpac357497
09-30-2009, 01:15 PM
Hi Jason,
My line 145 reads:
if (move_uploaded_file($uploadedFile["tmp_name"] , $attemptedServerFilePath)) {
The line you referred to is line 142.
None the less I inserted the code that you suggested in front of line 142 and it made no difference (other than shiftingthe error to now line 146)
Here is the calling code on my page:
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult2");
if(isset($_POST["_but2"])){
WA_DFP_UploadFile("WA_UploadResult2", "_upload2", "", "../../swf/", "[FileName]", "0", "[FileName]_[Increment]", "0", "false", "0", "0");
}
?>
<?php
More help please.
gpac357497
10-01-2009, 01:46 PM
Hi Jason,
Is there a next step here?
Jason Byrnes
10-02-2009, 11:47 AM
I have created a support ticket so we can look into this with you further. to view and edit your support ticket, please log into your support history:
http://www.webassist.com/mywebassist/supporthistory.php
vBulletin® v3.8.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.