rights problem with php and apache
| From: | Tetzner, Andreas | Date: | Tue, 19 Aug 2003 12:45:55 +0000 |
| Subject: | rights problem with php and apache | ||
| Groups: | php.install | ||
| Request: | Send a blank email to php-install+get-11453@lists.php.net to get a copy of this message | ||
I have a problem with PHP and Apache 1.3.27. A little PHP script reads a
.txt file and shows it. The user have to write some numbers into the text
and the script wrote the whole text into the file by press a button. This is
the script:
----------------------------------------------------------------
<? php;
$dateiname = "Messdaten.txt" ;
if($nachricht!=""){
$nachrichts = stripslashes($nachricht);
$di = fopen($dateiname, "w+" );
fwrite ($di, $nachrichts);
fclose($di);
echo "<b>Aenderungen gespeichert!<br></b>";
}
else {
echo "<b>Bitte die Messwerte eintragen, aber sonst nichts
veraendern!<br></b>";
}
;
$dii = fopen($dateiname, "r" );
$te = fread( $dii, filesize($dateiname));
echo "<form action=$PHP_SELF method=\"post\"><TEXTAREA
name=\"nachricht\"
cols=\"80\" rows=\"12\"
wrap=\"hard\">$te</TEXTAREA><br><input type=submit
name=\"Speichern\" value=\"OK Abspeichern\"></form>";
fclose($dii);
?>
-------------------------------------------------------------------
and this is the error message:
-------------------------------------------------------------------
Forbidden
You don't have permission to access
/DOKU/307017/3070177_Pos3_31_NA_sl_hrc/3070177__Pos3.31neu_160603/Messpunkte
/method="post" on this server.
----------------------------------------------------------------------------
----
Apache/1.3.27 Server at nc-srv1 Port 80
Hope there is anyone who helps me!
I´m not a PHP professional.
Andreas
---------------------------------------
Bitte beachten Sie, dass diese Email vertrauliche und/oder rechtlich geschuetzte Informationen
enthalten kann. Der Inhalt ist ausschliesslich fuer den bezeichneten Adressaten bestimmt. Wenn Sie
nicht der richtige Adressat oder dessen Vertreter sind, setzen Sie sich bitte mit dem Absender der
Email in Verbindung. Jede Form der Veroeffentlichung, Vervielfaeltigung oder Weitergabe des Inhalts
fehlgeleiteter Emails ist unzulaessig.
Es wird darauf hingewiesen, dass diese Email durch MAILsweeper von Clearswift auf Content
Security-Gefahren und Viren geprueft wurde.
---------------------------------------