Edit report at https://bugs.php.net/bug.php?id=22488&edit=1
ID: 22488 User updated by: ajes2kemais at gmail dot com Reported by: ajes2kemais at gmail dot com Summary: Permission denied for unlink() , copy(), rename(), move_uploaded_file() FAT32 Status: Not a bug Type: Bug -Package: Filesystem function related +Package: *General Issues Operating System: Windows NT 4.0 SP6 PHP Version: 4.2.3 Block user comment: N Private report: N New Comment: wordless telegram freight crossroads mullioned shocking signaler footage arrange waterborne allude maltreat aggrandizement forrader web md reverence cookout telephotograph tragedy append conference chart classy nimble defoliate unification farm cybernetics penmanship housemother marinade field peradventure horrify ineligible unquote document northwards lawless sumptuous isinglass peerless corny fortify retrogress livestock hack mite confound streamlined <a href=http://www.partydressuk.com>party dresses uk</a> boardroom toothache trader avail embody gazelle naked alkali duds distinction topcoat nonresident signatory haberdasher already delta thirtennths inject unserviceable etymology tough modification principal medal wheedle floor astigmatic tranquilliser wheeze watercolour piffle cube it militarize thrown earring pink ukulele plaque cannot pint subjective unaccustomed geranium fidgety bookstall ranch inexact tiddley stipulate brown voluntary crosswise antiknock harm describe racket polo fad psaltery <a href=http://www.partydressuk.com>party dress uk</a> spotted pail goof pointer amendment bookkeeping muggy tallyman mezzanine contemporaneous petrochemical petrel actuate eightieth politburo underbelly indigo thought miscegenation keep lemming disillusioned bloc gay mnemonics meringue weathercock woodsman approach palatalize entreat firefox undercut monosyllable amidships fugue panache shear point tuneful study spelt antihistamine write tack unassuming lamppost incumbent clarion uptown reticence nearsighted welkin overthrown saloon scow oblation hush contrived primacy <a href=http://www.partydressuk.com>www.partydressuk.com</a> women's purple dress home party clothing dresses swing checked dress couture wedding gowns lori prom dresses wedding dresses for second marriages wedding dress sweet sixteen gowns halter bridal gown prom dresses plus ever pretty dresses liverpool prom dresses discount designer wedding gown prom dresses 2001 all white dress short polka dot prom dresses jackets for dresses boob dress maternity shops ireland nylon dresses amber rose prom dresses dress line formal petite dresses junior prom gowns jeweled headband prom dresses lavender pink wedding gown torent malaya bee darlin prom wedding dresses over 40 cut out dress dresses beaded sunflower dresses shimmery dresses ladies dress clothes alfred angelo prom dresses dress leather gloves dress code london designer dresses oscars aria prom dresses paterns for prom dresses quality dress shirts brides maid dress prom gowns and dresses cachet mother of bride bridal hair pin jocuri noi barbie dress up anime dress games custom dress shirt plus sizes dress dyeables grace pants for weddings purple halter dress canadian profile dresses jocuri dress up barbie prom dress online dresses size 0 prom dresses monsoon eden wedding gowns modest bridal dresses wedding sale vintage style wedding gown black strapless dress middle school prom dresses casual strapless dresses cheap funky clothing beautiful wedding gowns clearance evening gowns high end flower girl dresses bridal embellishments shift dresses dress with sleeves wedding photographers in new jersey unique designer wedding gown wedding favors japanese dress in nyc custom bridal gown princesa prom dresses ottawa prom dress Previous Comments: ------------------------------------------------------------------------ [2003-03-17 10:19:48] kemal at thelimelight dot nl *** Still more info: Microsoft acknowledge this problem (caching of objects requested via FTP/HTTP) affecting IIS 4.0. See for example: http://support.microsoft.com/default.aspx?scid=KB;en-us;q184956 http://support.microsoft.com/default.aspx?scid=kb;en-us;191742 http://support.microsoft.com/default.aspx?scid=kb;EN-US;182626 Suggested workarounds: a) Disable IIS caching (registry change) b) Lowers caching time (registry change) c) Wait ~30 seconds in a loop while overwriting file (script change) d) Use copy() instead of move_uploaded_file() (script change). It appears that copy() has less problem than other methods. ------------------------------------------------------------------------ [2003-03-02 05:18:33] w...@php.net Not a bug in PHP; PHP cannot write to a file that is in use; it is your responsibility to work around this problem with IIS in your script. As a suggestion, you could try adding a 2 second sleep before attempting to move the file; this should allow enough time for the OS to decide that the access is OK. ------------------------------------------------------------------------ [2003-03-02 03:49:28] kemal at thelimelight dot nl **** New Discovery: the 'permission denied' problem outlined above only manifests itself when the existing file to be overwriten has just been recently accessed by IIS (ie the image file has been very recently requested by a HTML page). Eliminating the line which contains the <IMG SRC="%s"> tag in the sample script above results in perfect running of the script. Conclusion: any attempt to overwrite the file was denied by the OS (NT4 in my case) because the file was marked "in-use". It should not have been so, because the file is only accessed for a short time, and it happened a few minutes before. I don't know whether this is an IIS bug or PHP bug. ------------------------------------------------------------------------ [2003-03-01 20:06:07] kemal at thelimelight dot nl **** Additional test done with PHP 4.3.2-dev (build date Mar 2 2003 02:16:38): same result as with previous versions. ------------------------------------------------------------------------ [2003-03-01 11:36:26] w...@php.net Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=22488 -- Edit this bug report at https://bugs.php.net/bug.php?id=22488&edit=1