http://qs1969.pair.com?node_id=179240


in reply to system cascade

Calling "system" in a script run from command line and calling "system" in a CGI script run under your web server are different because of the different environments.

When you are running a CGI script, it is running as the web server process owner (or an alternate set by your web server configuration). Most often this is set to the user "nobody". This user is limited with permissions as it is intended to incorporate behaviour of an unauthorized visitor.

The solution to your problem lies in diagnosing what exactly is going wrong. Most of the error output is going to be in your web server logs so you should check there first. If you cannot find information there or your web server is not configured to trap error info from CGIs, try running your CGIs from command line (just run them like regular programs and they will ask to form parameters etc).

If the CGIs work fine from command line, then it is most likely a permissions or environment issue. Try to use fully qualified parths for the system command. Check if the user "nobody" or your web process user can run the other programs Trap the output from the other programs to help diagnose the situation (have it write to the /tmp folder which is often globally writeable).

-- termix