|
Posted by Benjamin on 10/19/26 11:59
It was totally my fault.
I had created the file with fopen and failed to call fclose before
trying to delete it. I suppose that fopen had use of the file so I
couldn't alter it.
Carl Vondrick wrote:
> Benjamin wrote:
> > Hello, I'm running PHP 5.2.0 as a Apache 2.2 server module. When, I try
> > to unlink I get this: "Warning: unlink(file.txt) [function.unlink]:
> > Permission denied..." What and how do I change this so it works?
> > Thanks
>
> Does this happen on PHP 5.1? It may be a PHP5.2 bug, in which case you
> should report it.
>
> We need to see some code first, but my guess is that you do not have
> permission to delete that file. What is the file CHMOD'd to? Can you
> delete it via the command line?
>
> Also, if you unlink something at script shut down (__destruct() for
> example), you will run into problems with permissions, because the
> engine is in the processing of shutting down and many streams are killed
> -- such as MySQL, and likely the filesystem.
>
> Carl
>
>
> --
> Carl Vondrick
> www.YoungCoders.com -- Forum for the younger, next generation programmers.
Navigation:
[Reply to this message]
|