Page 1 of 1

PHP Mailing list Subscription

Posted: Tue Aug 16, 2005 7:13 am
by kishorekodru
Hi i m pretty new to php.

i m having the following problem while running the php file.


<?
$emailaddr = $_POST["emailaddr"];
$filename = "log.rtf";
$date = date("l F dS, Y");
$file = fopen($filename,"a");
fputs($file,"$date >> $emailaddr\n");
fclose($file);
?>



The result i m getting is :


Warning: fopen(log.rtf): failed to open stream: Permission denied in /home/is7050/public_html/subscribemail.php on line 414

Warning: fputs(): supplied argument is not a valid stream resource in /home/is7050/public_html/subscribemail.php on line 415

Warning: fclose(): supplied argument is not a valid stream resource in /home/is7050/public_html/subscribemail.php on line 416


Help me out. thanks.

Posted: Tue Aug 16, 2005 7:49 am
by feyd
the folder (or file) you are trying to open is not read-writable by your script's user. You may be able to use chmod() to get it writable, but your script may run under a completely different user (nobody)