I am trying to test the ArdGuest - Free PHP Guestbook Script on a production server before installing on website.
I get the fllowing PHP Warning: fopen(ardgb18.dat) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: Permission denied in C:\CustomerData\shopdemo.webitry.net\index.php on line 419
if (!is_spam($newdata)) {
line 419 $tambah = fopen($data_file,"a");
if (strtoupper($os)=="WIN") {
if (flock($tambah,LOCK_EX)) {
fwrite($tambah,$newdata);
flock($tambah,LOCK_UN);
}
What is causing the error and how can it be corrected?
I think "failed to open stream: Permission denied" is about as plain as it could be stated IMHO.
Actually something like "failed to open file because www-data doesn't have write permissions" would be as plain as it can be stated. :-)
I mean the first time I encountered that error I was wondering why I didn't have permission because I was logged in as a root user. I know it now but I can't think of one error message from PHP or any other language that is stated in plain English. It just takes time learning the error language like learning the syntax of the code.
Bookmarks