This is my script

open(OUTFILE, ">>", "survey.txt") or die "$!";

I am runing this script through the webserver using a browswer, (action="http://localhost/pathtothecgiscript/cgiscript.cgi";) and the file, survey.txt, does NOT get created. When running from the command line the file DOES get created.
If I create the file in question, survey.txt, ahead of time and give it the permission 666, the webserver (Apache) can then write records to the file and the script runs with no problem.
Alot of people have been telling me that the webserver, in my case Apache, usually runs as a different user with different permissions than the user I am logged in as. But NO ONE can yet tell me how to give Apache or any webserver the right to create a file.


my syntax is okay and I have tried it like this also:

open(OUTFILE, ">>survey.txt") or die "$!";


like I said everything will work fine as long as I create the file ahead of time and give it the permission of 666.


thanks in advance

Elliot
http://www.elliotholden.com

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to