Reply to Re: http does not allow unlinking

Your name:

Reply:


Posted by Alred Wallace on 03/07/07 00:23

Many thanks for your answer,
My pb is solved now.

It was effectively a mysterious problem of right.

After doing again the same i already done (?), concerning script files
right, folder and images right, It works!!

I think that the right of the script file script file group "user" have to
had write right....but even with root right on the script file, my script
did'nt work.

I think the owner of the script when executing is the owner of the domain
(same user as ftp)....


and a user may have more right than root on is own files...???


I'll stop disgressing about casualties.
cu.









"shimmyshack" <matt.farey@gmail.com> a ιcrit dans le message de news:
1173199666.315146.34760@q40g2000cwq.googlegroups.com...
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 :
(

[Back to original message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация