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

Can't open an exe file without using command prompt.

Status
Not open for further replies.

Lulli

Programmer
Dec 11, 2005
14
SE
I use the following Perl script to run an exe file:

$cmd_add_new = "C:/Perl/eg/htpasswd -b logg " . "$userid " . "$password";
system($cmd_add_new);

#it works if I run it from MS-DOS command prompt but when I try to run the same script as a part of a larger script on apache server it just doesn't perform an execution (this time I am not using MS-DOS command prompt) .

Is it possible to run my script without using command prompt?

Thanks
 
Hi,

Sorry, do you mean in SSH/Telnet? UNIX server's don't have MS-DOS ;)

I'm a little confused as to what your using on your Apache server? They work very differently :p

Cheers

Andy

 
When your web app runs, it uses a different ID than when you're logged into that computer running the command. You'll want to make sure you give the appropriate permissions to that file so your web ID can execute it.

Please be aware, this is a dangerous thing to do and you'll want to verify anything (server side validation, not client side) being passed in from the Web page before running htpassword on the data passed.

- George
 
Exactly what I was thinking =) Had the same problem when developing a PDF conversion system (Word=>PDF).

Right PITA :(

Cheers

Andy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top