Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Warning: unlink(C:\Users\john\AppData\Local\Temp\phpE862.tmp) [function.unlink]: Permission denied in plupload_handle_uploads() (line 344 of ...\plupload\plupload.module) appears when I try to upload files in a Media Gallery.
When I upload 1 file, error appears 3 times; with 2 files, error appears 6 times.
Files might be uploaded, but are not attached to the Gallery. source, tmp, target and DAMP are all local.
i use module from 31-3-2011 and plupload library 1.4.2
Comment | File | Size | Author |
---|---|---|---|
#6 | add-fclose-1121070-6.patch | 749 bytes | Moloc |
Comments
Comment #1
avizzino CreditAttribution: avizzino commented(Almost) the same issue here.
Varsions:
plupload v 1.4.3.2
plupload module v. 7.x-1.0-beta2
I get a message for every file i upload.
I monitored my tmp folder and I noticed that when I start uploading a file, the temporaru file
phpXXX.tmp
is created. Upon success on uploading, the filephpXXX.tmp
is replaced by something likep15utbbubj1t8eg69b5elv91i1d3.tmp
When I save my node the
p15utbbubj1t8eg69b5elv91i1d3.tmp
file is removed. But, somehow, the module must still try to access and unlink the originalphpXXX.tmp
file which is, obviously, not there anylonger.I hope this helps fixing the bug.
EDIT:
system info:
- WinXP pro
- Apache/2.2.17 (Win32) PHP/5.3.6
- I can reproduce with IE8, FF (latest version to date), Chrome (latest version to date)
Comment #2
effulgentsia CreditAttribution: effulgentsia commentedAnyone else seeing this? I just tried it on Windows 7 Home Premium with Acquia Dev Desktop for Windows, and adding to the Media Gallery works fine on my end. If you're able to reproduce, please report the version of your OS and AMP stack, and also which browser (and version), and whether or not you have the Flash player installed in that browser.
Re #1: you're referring to saving a node rather than uploading to the Media Gallery. What module are you using for integrating plupload with nodes?
Comment #3
avizzino CreditAttribution: avizzino commentedI don't know if you noticed, but I edited my previous message with the info you required.
Please let me know if you need further info.
Thanks in advance.
A.
Comment #4
monican CreditAttribution: monican commentedSame issue here. Win 7, Wamp 2.1 (Apache 2.2.17 / PHP 5.3.5), Firefox 3.6.18
Comment #5
Moloc CreditAttribution: Moloc commentedIt seems, that the input stream is not closed. Closing the input stream solves the problem for me.
Adding
in plupload.module after the while-loop
line ~ 336 and line ~ 364
Comment #6
Moloc CreditAttribution: Moloc commentedI tried to create a patch based on comment #5.
Comment #7
othermachines CreditAttribution: othermachines commented#6 patch got rid of the error for me. Thanks for that.
Wondering: should drupal_unlink() be used instead of PHP's unlink()? The doc states that "PHP's unlink() is broken on Windows, as it can fail to remove a file when it has a read-only flag set.".
Comment #8
petsagouris CreditAttribution: petsagouris commentedThanks for the patch, the error goes away.
Comment #9
petsagouris CreditAttribution: petsagouris commented@ #7 : Indeed the
drupal_unlink()
should be used instead of the PHPunlink()
.I suppose that this should go into a different issue if a patch is not introduced in this one.
Comment #10
slashrsm CreditAttribution: slashrsm commentedCommited to 7.x-1.x: http://drupalcode.org/project/plupload.git/commit/32b2c11
Thanks!
Opening new issue for
unlink()
: #1445172: Use drupal_unlink() instead unlink()Comment #11
slashrsm CreditAttribution: slashrsm commented