Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Cannot save to file with a CGI scipt

by hacker_j99 (Beadle)
on Oct 23, 2002 at 08:33 UTC ( [id://207311]=note: print w/replies, xml ) Need Help??


in reply to Cannot save to file with a CGI scipt

I found this out the hard way
the permissions on the data file need to be set at least to 766 to allow writing and reading

here is a sample code that I was working on simular...
#!/usr/bin/perl use CGI; $data = new CGI; $email = $data->param('email'); $datafile ="/full_path/data2.txt"; open (FORUM, "<$datafile"); @lines = <FORUM>; close (FORUM); $email="eww"; open (FORUM, ">$datafile"); print FORUM ("EMAIL"); print "Content-type: text/html\n\n"; print "$email";


Hacker_J99
UTC File Server for all your File needs

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://207311]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2024-03-28 10:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found