in reply to Re^2: System call within cgi script
in thread System call within cgi script

Well, if the program you're trying to call is an interactive program (which notepad from your example is and most GUI programs are), then your issue is that the called program starts and drops into a "wait for user input" loop. since its called from a CGI script, however, Apache seems to prevent said interactive program from displaying in the active windows session, so it will never get any user input.

diatolevi's suggestion of using Win32::Process is a step in the right direction, in that it starts the process and then exits the CGI script successfully. Unfortunately, it still does so under Apache, thus preventing the user from ever seeing the interactive program.

__________
The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it.
- Terry Pratchett

Replies are listed 'Best First'.
Re^4: System call within cgi script
by pmcaveman (Novice) on Jan 29, 2007 at 21:25 UTC
    Well, I finally got it. If I put my system call in a perl script, and call that from the .cgi script (closing STDOUT along the way), and then do the fork/exec dance, everything worked. Seems like the really long way to go to get where I needed to go, but whatever works. I will need to polish this turd up before I step in it again, but at least it is functional.

    Thanks for the help!

    -Kevin