in reply to system() or exec() in CGI scripts

system and exec do two different things. system starts up another process, waits for it to finish, and then continues with the rest of the original process. exec replaces the current process with a new one.

However, if explorer.exe starts on the machine, but doesn't exhibit the wanted behaviour, it's not a matter of system vs exec. In fact, it's unlikely to be a Perl problem. What happens if you run the command from the command line? What happens if you run the command from a CGI program written in a different language than Perl? Could it be that the webserver sets up an environment that iexplorer.exe doesn't like?

Abigail

Replies are listed 'Best First'.
Re: Re: system() or exec() in CGI scripts
by LupoX (Pilgrim) on Sep 09, 2003 at 11:16 UTC

    If I start the perl script local the browser window does open. Also the batch file does work. The only difference to the CGI script ist that the explorer window does open and when starting via CGI it does not open.

      Then it's a CGI issue, and not a Perl issue. Your server sets up a different environment (variables, UID, permissions, limits) than you have from the command line. At least one of these differences prohibits your exe file to behave differently.

      Abigail