Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: system cascade

by termix (Beadle)
on Jul 03, 2002 at 17:38 UTC ( #179240=note: print w/replies, xml ) Need Help??

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

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://179240]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2023-06-07 13:20 GMT
Find Nodes?
    Voting Booth?
    How often do you go to conferences?

    Results (29 votes). Check out past polls.