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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how does the system command work?

Status
Not open for further replies.

Horrid

Programmer
May 20, 1999
373
I am trying to run an exe from a perl CGI script.
I am trying to use a system("apppath/appname") command but nothing ever happens. Are there any special things I need to do before a system command? Is it possibly to call an EXE from a CGI script?

could someone post an expample of running something as simple as notepad please.

Thans in advance
 
a better question might be 'how do I get information about Perl functions?'. That answer is .....

prompt>perldoc -f system<return>

read what is produced.

I'm not trying to be short. But, that utility will help more than I can.

The is a FAQ on using Perl's built in documentation - faq219-321


HTH



keep the rudder amid ship and beware the odd typo
 
Ok, the problem is probably in your path to the CGI script. Your web server (if it's secure) probably only allows CGI programs to see stuff in the /var/ or whatever directory you're in, that is, as far as the web server knows, /var/ is the root of the whole system. So, if you try to run a program in /usr/local/bin/myProg it won't work. This is because your webserver looks in /var/ because the root of the system is at /var/ If you're using windows, it's something like c:\ or whatever.

Also, your web server permissions or file permissions may not be set to let you do that. If you needm ore advice, post the code, OS and web server you're using.

MWB. As always, I hope that helped!

Disclaimer:
Beware: Studies have shown that research causes cancer in lab rats.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top