|
Posted by shimmyshack on 03/06/07 16:47
On Mar 6, 3:39 pm, "Alfred Wallace" <p...@free.Fr> wrote:
> in fact my script post_gallerie is: ( /manager/post/post_galerie.php )
>
> unlink( $_POST['suppr_gal'] );
> header("location:".$_SERVER['HTTP_REFERER'] );
>
> owner:zapping
>
> called by index.php in the backoffice (form action = post/post_galerie.php)
> ( /manager/index.php )
>
> and my directory "/manager" is locked by an htaccess.
>
> My image directory is "/images",
> the owner of the image uloaded by script is "nobody" group "nobody".
>
> perhaps the htaccess block my script?? ( or make user not the same??)
>
> "shimmyshack" <matt.fa...@gmail.com> a écrit dans le message de news:
> 1173188254.997020.188...@30g2000cwc.googlegroups.com...
>
> > On Mar 6, 12:35 pm, "Alred Wallace" <p...@free.Fr> wrote:
> >> Hi all,
>
> >> What is the cause of the following error:
>
> >> " http does not allow unlinking "in a php script using unlink?????
>
> > whats your code?
> > how are you calling unlink?
> > does the user have permissions to unlink at that point?
> > whats the url of the script, are you calling it
> > href="unlink.php?unlink=file.ext"
> > or
> > href="http://server.com/unlink.php?unlink=file.ext"
>
> > throw us a bone here.
hmm, unless it is a permissions issue which you can workaround as you
suggest (or perhaps using umask if needed) I'm at a loss, is http the
apache user? Can you try specifying the file using an absolute path,
also be very careful when allowing
unlink( $_POST['name'] );
because people can modify the name to anything they choose.
So try to remove the file using an absolute name rather than the post
var, I suspect perissions and have only seen this error 3 times in my
life, could you try returning the value
$val = unlink( $_POST['suppr_gal'] );
var_dump($val);
exit;
also using @unlink might help - if it throws an error the header will
fail.
just a few thoughts, although I don't have anything definitive to say :
(
Navigation:
[Reply to this message]
|