Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 08-19-2004, 03:50 PM Guestbook error
morphius2's Avatar
Experienced Talker

Posts: 31
Trades: 0
Hi, I am installed this guestbook today. When I tried to post a test message, I got the following error:

Warning: fopen(data.txt): failed to open stream: Permission denied in guestbook.php on line 80

Here are lines 75-85:

Code:
 
	 $contents_new=stripslashes($contents_new);
	 $contents_new=conv_asc2html($contents_new,1);
	 if (strstr($contents_old,$contents_entry)){
		 disperr("Duplicate entry");
	 } else {
		 if ($file=fopen($data,"w")){ 
			$contents_new=$contents_new. "\r\n" . $contents_old;
			fputs($file,$contents_new); 
			fclose($file);
			$contents_old=$contents_new;
		 }
Can you help me, please?
I'm still very new to php- Thanks!
__________________
- Morphius2
morphius2 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-19-2004, 04:09 PM
Calash's Avatar
Super Talker

Posts: 104
Trades: 0
Make sure data.txt is set to have permission to write to it. For a unix server 777 will do it.
__________________

Please login or register to view this content. Registration is FREE
Calash is offline
Reply With Quote
View Public Profile Visit Calash's homepage!
 
Old 08-19-2004, 05:07 PM
morphius2's Avatar
Experienced Talker

Posts: 31
Trades: 0
Ah ha! Now I would had never thought about that, thanks!! Now anytime I get that kind of error, I should look at the permissions, then?
__________________
- Morphius2
morphius2 is offline
Reply With Quote
View Public Profile
 
Old 08-19-2004, 05:19 PM
Christopher's Avatar
Iced Cap

Latest Blog Post:
Cross-domain AJAX with JSONP
Posts: 3,110
Location: Toronto, Ontario
Trades: 0
Yes, make sure it exists and the directory is writable if it doesn't exist.
__________________

Please login or register to view this content. Registration is FREE
- Latest Articles:
Please login or register to view this content. Registration is FREE
,
Please login or register to view this content. Registration is FREE

--
Please login or register to view this content. Registration is FREE

Christopher is offline
Reply With Quote
View Public Profile
 
Old 05-15-2005, 03:50 PM Same prob
Junior Talker

Posts: 1
Trades: 0
Hi, i've got the same errors at http://www.sebszhost.com/~boterbram/...k/huiswerk.php but I have no idea what an unix server is and I don't know if it's just my host or if I can change the permissions of guestbook.txt.
boterbram is offline
Reply With Quote
View Public Profile Visit boterbram's homepage!
 
Old 05-16-2005, 12:04 PM
Uche's Avatar
Extreme Talker

Posts: 174
Location: Nigeria/Lagos
Trades: 0
Boterhram, A Unix server is just same as Linux if i'm rite.. just go to your CONTROL PANEL thats was given by you by your Host Company, Click file manager and Click on Public_html.. then searh 4 ur guestbook.txt by rite conner of your page. you will find a word thats says CHANGE PERMISSION if i'm rite. click on those option box. to allow u to write in.
Uche is offline
Reply With Quote
View Public Profile Visit Uche's homepage!
 
Reply     « Reply to Guestbook error
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.21460 seconds with 12 queries