PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 9th, 2000, 03:50 PM
jonathan@sterkwater.net jonathan@sterkwater.net is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2000
Location: Belgium
Posts: 7 jonathan@sterkwater.net User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi all,

I made a script for logging the emails that they send on my site. It works fine on windows 98 version, but when I upload it to a Linux computer it fails.

Here are the first lines of the script:

$file = fopen("log/index.html", "a+");
$today = date("G:i, l jS Y");
if ($argv[0] == "contact")
{
if ($name == "")
{
fputs($file, "Text comes here";
fclose$file);
}

Then the output is:

Warning: fopen("log/index.html","a+") - Permission denied in /home/jonathan/public_html/beftubbies/email.php3 on line 3

Warning: Unable to find file identifier 0 in /home/jonathan/public_html/beftubbies/email.php3 on line 30

Warning: Unable to find file identifier 0 in /home/jonathan/public_html/beftubbies/email.php3 on line 31

Thank you.

-Jonathan
http://www.sterkwater.net/~jonathan/beftubbies

Reply With Quote
  #2  
Old January 10th, 2000, 02:32 AM
PAV PAV is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 1999
Location: Netherlands
Posts: 77 PAV User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 14
If you want to open a file to write to it, try the "w" argument, like:

$file = fopen("log/index.html", "w");

Peter

Reply With Quote
  #3  
Old January 10th, 2000, 07:10 AM
falcon falcon is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 1999
Location: UK
Posts: 50 falcon User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 21 m 33 sec
Reputation Power: 14
Its just a suggestion but have you modified the access rights the file and directory. It needs to enabled so that a web user can read and write from them.

In linux use the commands : chown & chmod

Hope this helps

Falcon

Reply With Quote
  #4  
Old January 10th, 2000, 03:05 PM
jonathan@sterkwater.net jonathan@sterkwater.net is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2000
Location: Belgium
Posts: 7 jonathan@sterkwater.net User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>In linux use the commands : chown & chmod

That was the first thing I did when I uploaded it.
Now I tried with fopen("log/index.html","w")
but...

Warning: fopen("log/index.html","w") - Permission denied in /home/jonathan/public_html/beftubbies/email.php3 on line 3

-Jonathan http://www.sterkwater.net/~jonathan/beftubbies

Reply With Quote
  #5  
Old January 11th, 2000, 02:44 AM
PAV PAV is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 1999
Location: Netherlands
Posts: 77 PAV User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 14
That's very strange
It seems you're not able to write to your own files. Did you do a chmod 755 or 644 on the file?

Peter

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > fput function.

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap