php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21671 unlink doesnt work properly in classes
Submitted: 2003-01-15 13:09 UTC Modified: 2003-01-16 02:33 UTC
From: mascha at keipper dot de Assigned:
Status: Not a bug Package: Filesystem function related
PHP Version: 4.2.3 OS: Win2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mascha at keipper dot de
New email:
PHP Version: OS:

 

 [2003-01-15 13:09 UTC] mascha at keipper dot de
hi php "bug volunteers",
i experienced a problem with unlink()
you can see a phpinfo() output of my config on:
http://www.keipper.de/phpinfo.html

what i did:
i tried to simply unlink a file inside a class, the software i am coding is a complex class-model with super-classes, some cub-classes and so on, even too complex to explain in a few words.

in a sub class i simply tried:
if (unlink('D:\testzone\pagesys\content_repository\sites\1000.xml')) {
[...] } else { [...] }


...and what actually happened:
it doesnt removes the file. it says:
Warning: unlink() failed (Permission denied) in D:\testzone\pagesys\php_code\commander.php on line 361

my filesystem is FAT32, my doc root d:\testzone\, ok, i dropped a script in:
D:\testzone\test.php

it doesnt instance objects, sub-objects or anything, it just had one code-snippet - the above mentioned if() and it worked ?! the simple test.php deletes the file

also i tried as path:
D:/testzone/pagesys/content_repository/sites/1000.xml

again - worked in test.php, doesnt worked in the sub-class

the file was not locked, isnt write-protected or something

i think this is strange and a bug

so I hope this is enough information for working out a potential bug

greets,
mascha k. (btw. this "mascha" is not a girlie name, so dont call me "babe" ;=) )

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-16 02:32 UTC] mascha at keipper dot de
im dumb, the problems was, an open filepointer was pointed to that file, because of that unlink() doesnt work properly

sorry for the inconvenience...

greets
m.
 [2003-01-16 02:33 UTC] derick@php.net
Not a bug -> bogus
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 04:01:28 2024 UTC