in reply to Here's the script thats giving me trouble

When your CGI script runs online it runs as the default web user 'web' or someone similar. When you run your script from the command line and it works are you running your script as the default web user 'web'?

If the script fails from the command line when run as the web user then that is the source of your problem. You need to grant the appropriate rights to the web user.

Another source of the problem you describe can occur when the web user has the appropriate rights, but there is an existing tower.345 file that was created during testing by a privileged user such as root. In that case your program might fail because the web user does not have the rights to blow away a file owned by a privileged user.

In my experience, it-runs-from-the-command-line-but-not-online CGI problems are most often caused by the default web user having insufficient rights. Give the web user sufficient rights to run the program and the problem goes away.

  • Comment on Re: Here's the script thats giving me trouble