in reply to Printing to a file not working

I see you are using a filename without path, this means you are opening the file in the current directory. But while from command line you know which directory is current, when your script is running as cgi you can't know it, so you should always use fully qualified filenames and/or explicitly set the current directory with chdir.

Rule One: "Do not act incautiously when confronting a little bald wrinkly smiling man."

Replies are listed 'Best First'.
Re^2: Printing to a file not working
by olus (Curate) on Jul 28, 2008 at 09:03 UTC

    My thoughts too. There may be also permissions issues, like the user by which the webserver is running not having permissions to write the files.

      Yes, but it is difficult checking the write permission on a dir you don't know where is... :)

      Rule One: "Do not act incautiously when confronting a little bald wrinkly smiling man."