Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling external programs via cgi on win32

Status
Not open for further replies.

jamesjyu

IS-IT--Management
Jul 1, 2004
3
US
I have been battling this problem all day. The script itself is quite simple.

I am developing a web form that will allow the user to run an external program on the server. I am using Apache on win32, and using Perl via CGI.

At the command line, the script works perfectly. I am able to run the external program with no problems. However, when I hit submit and run the script via the web browser (POST), either nothing happens, or the external program crashes.

I have tried what I think is every technique in perl to run an external program.. system, exec, Win32::Spawn(), Win32::process::Create(). They all work at the command prompt, but none work through the post method.

I am running under windows XP professional, and have everyone to have full control of the directory with the external program. The fact that it works via the command prompt and not the post method leads me to believe that there must be something different in the environment when perl is run through the post method. Can someone enlighten me about what the difference is? And if you've had similar issues, and how you solved them..?

 
What security settings do you have set up for your Apache server? Does it run using your own user accont, or some special restricted user account set up for it? Does the program you're running require anything special in the environment variables, maybe something you have set for your user account and not for the environment Apache sets up for itself?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top