Einzelnen Beitrag anzeigen
Alt 19.01.2002, 19:50   #1
Gironimo
Veteran
 
Registriert seit: 30.04.2000
Alter: 46
Beiträge: 490


Böse IIS:PHP "Permission denied..."!

folgendes Problem: ich hab einen Counter in einem PHP Skript eingebaut, allerdings bringt der Browser Fehlermeldungen. Im internen Browser vom Editor PHP Coder funktioniert es.

Ohne Counter funktioniert es. Die Einstellungen am IIS sollten eigentlich stimmen.

der Source:
<?php
$countfile = "count.dat";
if(! file_exists($countfile)){
$fd = fopen($countfile,"w+");
$count=0;
} else {
$fd = fopen($countfile,"r+");
$count = fgets($fd,100);
if (! $count)
$count=0;
}
rewind($fd);
$count++;
fwrite ($fd, $count);
fclose ($fd);

echo "<html>
<head>
<title>Gironimo's Site</title>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">
<link rel=\"stylesheet\" href=\"styles.css\" type=\"text/css\">
</head>

<body bgcolor=\"#FFFFFF\" text=\"#000000\" link=\"#000000\" vlink=\"#000000\" alink=\"#000000\">
<table width=\"100%\" border=0 cellspacing=0 cellpadding=0 height=100% align=center>
<tr>
<td>
<div align=\"center\">


<img src=\"/images/gironimo.jpg\" width=493 height=162></p>


<font color=\"#666666\"><font size=\"1\" class=\"noformat\">SEND ME AN
<a href=\"mailto:gironimo20@gmx.at\">E-MAIL</a>!</font>
</font></p>
</div>
</td>
</tr>
<tr>
<td><div align=\"center\">Sie sind der " . $count . ". Besucher</div>
</td>
</tr>
</table>
</body>
</html>"
?>


die Fehlermeldungen:
Warning: fopen("count.dat", "r+") - Permission denied in G:\Inetpub\wwwroot\php\index.php on line 8
Warning: Supplied argument is not a valid File-Handle resource in G:\Inetpub\wwwroot\php\index.php on line 9
Warning: Supplied argument is not a valid File-Handle resource in G:\Inetpub\wwwroot\php\index.php on line 14
Warning: Supplied argument is not a valid File-Handle resource in G:\Inetpub\wwwroot\php\index.php on line 18
Warning: Supplied argument is not a valid File-Handle resource in G:\Inetpub\wwwroot\php\index.php on line 19


Kann der IIS nicht auf externe Dateien zugreifen? Der Include-Befehl funktioniert auch nicht, ich hab nämlich probiert, den Counter in einem externen File einzubinden. Aber ich hab gehört, dass der Include-Befehl unter Windows generell nicht funktioniert.(?)

Der Link: Mein php-Testserver

Thx for any advice
Gironimo
Gironimo ist offline   Mit Zitat antworten