On Sun, Apr 22, 2001 at 08:26:18PM +0200, Thomas De Groote wrote:
> Hey again,
> 
> I got the output from the backticks (how could I guess it was just
>  $temp=  `command`; ). Now it seems to have a small problem though...
> 
> When I call it by use of my CGI, it won't actually do the command and go
> further through the code. The command to be executed is a smssend s-app,
> which takes some time (about 2 seconds at least ) to complete. When I call
> it in a script from the terminal, everyting goes fine, but in my CGI, it
> just runs over it and never actually performs it. Is there a way to force
> the script to wait ? (Maybe by some pipe to bash ?)
> 

If the command doesn't return the expected output, it is because an error
occured.  The variable $? contains the status returned by the external
process (see perlvar for more details).

Note that the environment for the CGI user is probably different from your
shell environment.  Try specifying the full path to the smssend command,
which may not be in the CGI user's PATH.  Also check the permissions to
make sure the CGI user is allowed to execute the command.

Ronald

Reply via email to