Re: writing to a file

2004-05-20 Thread William McKee
On Thu, May 20, 2004 at 09:02:18AM -, PerlDiscuss - Perl Newsgroups and mailing lists wrote: > Is there any easy way I can find out why the file cant be opened (is it > permissions?). Yes, print the error message that Perl provides in $!. For example, eval { open (LOGFILE, ">> lo

RE: writing to a file

2004-05-20 Thread Wiggins d Anconia
Please bottom post... > Also, the first line, > > > #!/usr/local/bin/perl > > What if the server isn't a UNIX server, but an IIS server? Doesn't this line > have to change? > Careful, Unix is an OS type, IIS is an application software group. It is my understanding (which could be very wrong)

RE: writing to a file

2004-05-20 Thread Gottron, Shirley A
AIL PROTECTED] Subject: Re: writing to a file > Hi > > I have a very simple cgi script that I have put onto a webserver. I want > to write to a log file when it is run. My problem is that the open file > command always fails (and I get the "openFailed" message in my

Re: writing to a file

2004-05-20 Thread Wiggins d Anconia
> Hi > > I have a very simple cgi script that I have put onto a webserver. I want > to write to a log file when it is run. My problem is that the open file > command always fails (and I get the "openFailed" message in my browser). > (even if i try opening for input it fails). I have created the fi

writing to a file

2004-05-20 Thread PerlDiscuss - Perl Newsgroups and mailing lists
Hi I have a very simple cgi script that I have put onto a webserver. I want to write to a log file when it is run. My problem is that the open file command always fails (and I get the "openFailed" message in my browser). (even if i try opening for input it fails). I have created the file called lo

Re: Problem writing to a file

2003-09-17 Thread Dan Anderson
> many ways to solve the problem. Amongst the real issues that > the person will ultimately need to work out is whether it is > really SANE to be writing temp files to begin with I mean Yes! That is the other thing. If you write a script that writes temp files you should consider it LOCAL ON

Re: Problem writing to a file

2003-09-17 Thread drieux
On Wednesday, Sep 17, 2003, at 18:02 US/Pacific, Dan Anderson wrote: [..] It is possible to use .htaccess files, apache config directives, and burying 777 directories in 700 directories to add to the security of having a 777 directory. dan, my complements! on the XML.document - and yes, there ar

Re: Problem writing to a file

2003-09-17 Thread Dan Anderson
> less acceptable on more and more web-sites. Prudence > generally dictates 755 where other members of your group > and the rest of the world can read and execute. It is possible to use .htaccess files, apache config directives, and burying 777 directories in 700 directories to add to the securi

Re: Problem writing to a file

2003-09-17 Thread drieux
On Wednesday, Sep 17, 2003, at 14:15 US/Pacific, John Park wrote: [..] Although I don't understand why I can't write to the same directory my CGI scripts are located in. I've done this before on Free Webhosts like tripod and netfirms. [..] while we are all deeply and emotionally committed to our

Re: Problem writing to a file

2003-09-17 Thread drieux
On Wednesday, Sep 17, 2003, at 18:50 US/Pacific, ram Osuri wrote: I agree with your assesment .. to solve this problem you might want to do a chmod 777 newfile.txt and then run the program it will work then Actually there are two problems with this. a. there is no reason to set the execute bits

Re: Problem writing to a file

2003-09-17 Thread John Park
On Wednesday, September 17, 2003, at 03:56 PM, drieux wrote: Remember that most web servers are running as the web-server uid - www or apache - and so can only 'write' where that uid has 'write permission'. It can of course read/execute anything that is 'world readable/executable' but as a genera

Re: Problem writing to a file

2003-09-17 Thread drieux
On Wednesday, Sep 17, 2003, at 11:59 US/Pacific, John Park wrote: [..] This is what my script looks like: #!/usr/bin/perl use CGI; ... ... open(FILE,">newfile.txt") || die("newfile.txt: $!"); #script stops here due to permissions [..] that is the correct syntax - although you might not want to '

RE: Problem writing to a file

2003-09-17 Thread Mark Weisman
---Original Message- From: John Park [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 17, 2003 11:00 AM To: [EMAIL PROTECTED] Subject: Problem writing to a file Hi everyone, I have a script where I am trying to write information to a file but could not do so. This is what my script looks like:

Problem writing to a file

2003-09-17 Thread John Park
Hi everyone, I have a script where I am trying to write information to a file but could not do so. This is what my script looks like: #!/usr/bin/perl use CGI; ... ... open(FILE,">newfile.txt") || die("newfile.txt: $!"); #script stops here due to permissions I can open files, and output its conte