Article View: pl.comp.lang.php
Article #384Re: htpasswd i PHP
From: Grzegorz R. Gryczka
Date: Mon, 20 Aug 2001 19:49
Date: Mon, 20 Aug 2001 19:49
38 lines
1883 bytes
1883 bytes
On Mon, 20 Aug 2001 21:20:32 +0200, Tom <sunnytom@poczta.onet.pl> wrote:
> podobnie z funkcja system i passthru i tez nic . Nie wiem ile jest w tym
> prawdy, ale skrypty php uruchamiaja sie jako "nobady" - moze to ma zwiazek z
> tym ze nie moge zapisywac w pliku itp .
^^^^^^^^^^^^^^^^^^^^^^^^^^
grzesiek:/var/www/test# cat index.php
<html>
<head>
<title>htpasswd</title>
</head>
<body>
<?php
if ($r==null)
$r=false;
if ($r){
system ("htpasswd -b /tmp/htpasswd $id $passwd");
exit;
}
?>
<form action="./index.php?r=true" method="post">
<b>Id:</b> <input type="text" name="id"><br>
<b>Hasło:</b> <input type="text" name="passwd"><br>
<input type="submit" value=" Jazda! ">
</form>
</form>
</body>
</html>
grzesiek:/var/www/test# l /tmp/htpasswd
-rw-rw-rw- 1 root root 73 sie 20 21:45 /tmp/htpasswd
grzesiek:/var/www/test#
--
Grzegorz R. Gryczka
grg@tg.onet.pl
Technical Details
Message-ID:
<9lrpkd$5f8$1@grzesiek.pc172.nisko.sdi.tpnet.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!mat.uni.torun.pl!news.man.torun.pl!news.man.poznan.pl!news.ipartners.pl!news.internetia.pl!news.tpi.pl!nnrpdReferences:
<9lri4e$p9j$1@news.tpi.pl> <9lrn4o$1tl$1@grzesiek.pc172.nisko.sdi.tpnet.pl> <9lrnu0$sce$1@news.tpi.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!mat.uni.torun.pl!news.man.torun.pl!news.man.poznan.pl!news.ipartners.pl!news.internetia.pl!news.tpi.pl!nnrpd From: grg@tg.onet.pl (Grzegorz R. Gryczka) Newsgroups: pl.comp.lang.php Subject: Re: htpasswd i PHP Date: Mon, 20 Aug 2001 19:49:33 +0000 (UTC) Organization: :-) Lines: 38 Message-ID: <9lrpkd$5f8$1@grzesiek.pc172.nisko.sdi.tpnet.pl> References: <9lri4e$p9j$1@news.tpi.pl> <9lrn4o$1tl$1@grzesiek.pc172.nisko.sdi.tpnet.pl> <9lrnu0$sce$1@news.tpi.pl> NNTP-Posting-Host: pc172.nisko.sdi.tpnet.pl Mime-Version: 1.0 X-Trace: news.tpi.pl 998336910 7253 217.97.30.172 (20 Aug 2001 19:48:30 GMT) X-Complaints-To: usenet@tpi.pl NNTP-Posting-Date: 20 Aug 2001 19:48:30 GMT X-Path-Notice: Path line has been filtered X-Original-Path: grzesiek!not-for-mail User-Agent: slrn/0.9.7.1 (Linux) Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit