Re: httpd write file out from within cgi script

2018-08-11 Thread Toru Okada
Hi Hiltjo: Your solution with open(my $fh, ">", "/foo/out"); works. Many thanks. Am 12.08.2018 um 00:58 schrieb Hiltjo Posthuma: > On Sat, Aug 11, 2018 at 11:45:14PM +0200, Toru Okada wrote: >> Now: >> >> #!/usr/bin/perl >> >> print("Content-Type: text/html; charset=ascii\r\n\r\n"); >> print("a

Re: httpd write file out from within cgi script

2018-08-11 Thread Hiltjo Posthuma
On Sat, Aug 11, 2018 at 11:45:14PM +0200, Toru Okada wrote: > Now: > > #!/usr/bin/perl > > print("Content-Type: text/html; charset=ascii\r\n\r\n"); > print("a"); # works > # no error but not found in file system after the script finished > open(my $fh, ">", "/var/www/foo/out"); What about chang

Re: httpd write file out from within cgi script

2018-08-11 Thread Toru Okada
Now: #!/usr/bin/perl print("Content-Type: text/html; charset=ascii\r\n\r\n"); print("a"); # works # no error but not found in file system after the script finished open(my $fh, ">", "/var/www/foo/out"); print($fh "foo"); close($fh); print("b"); "foo" is writable by all: # ls -l /var/www/ total

Re: httpd write file out from within cgi script

2018-08-11 Thread Hiltjo Posthuma
On Sat, Aug 11, 2018 at 07:58:02PM +0200, Toru Okada wrote: > Hi: > > I want to write a file out from within a perl cgi script. This is obviously > not possible in the standard configuration of httpd. The normal output works > perfectly. What is to do? > > #!/usr/bin/perl > > print("Content-Ty

httpd write file out from within cgi script

2018-08-11 Thread Toru Okada
Hi: I want to write a file out from within a perl cgi script. This is obviously not possible in the standard configuration of httpd. The normal output works perfectly. What is to do? #!/usr/bin/perl print("Content-Type: text/html; charset=ascii\n\n"); print("hello world"); # works # no error b