Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Running a DOS app under iIS?
Hi

I am having trouble getting a DOS executable program to run from my PERL
script. I have been successfully running the scripts under apache 2.0 and
ActivePERL 5.8 on my XP box, with both the local client and remote clients.
When I uploaded the script to my webhost which run IIS5 I get an "Access
Denied". The webhost's support have been unable to help me.

I have am now trying it out on my IIS5.0 on Windows 2000, and although I am
not getting the same error message, my application is not running as
expected.

I thought it might be easier to use a different DOS program than my app in
case it was the problem so I have been trying the old faithful pkunzip.exe
and am getting some unexpected results.

If you start pkunzip at a command prompt without any parameters eg
c:\>pkunzip
then you get a help message sent to stdout..

To test an archive you start PKUnzip
c:\pkunzip -t myzip.zip
and if the zipis is ok then a message verify the integrity of the zip is
sent to stdout.

Various version of my PERL script to start PKUnZip have been

#!c:\perl\bin\perl.exe -w
#unzip.pl
print "Content-type:text/html\n\n";
system("pkunzip")
print "<html>" ;
system("pkunzip.exe -t myzip.zip")
print "Done" ;
print "</html>" ;

The only output is "Done":

changing the System line to:
system("cmd /c pkunzip.exe");
is far better as I receive the expected Help message

I eventually got at least something along the lines I wanted with  with:
system("cmd","/c","pkunzip.exe","-t",
"c:\\inetpub\\wwwroot\\cgi-bin\\myzip.zip")
However although it can fine the myzip.zip file the error message coming
from PKUnzip is that is can't open it?

I can run the script from the Command Prompt by just type zip.pl and it runs
fine.

Can anyone shed some light on this.

By the way, I think I mentioned it earlier but I have no problems when
running this under Apache.

Thanks
Brian




Report this thread to moderator Post Follow-up to this message
Old Post
Brian Hancock
11-20-04 08:55 PM


RE: Running a DOS app under iIS?
Hi,

You might need to set the execute permission on the pkunzip exe for the
iusr_local_machine or whatever user it is that IIS uses. Or maybe even try
fiddling with permissions on the files that the program works on - just
because your user can run the programs and access the files, doesn't mean
that IIS' user account can.

HTH,
Mike

-----Original Message-----
From: Brian Hancock [mailto:brian.hancock@brileigh.com]
Sent: 20 November 2004 11:53
To: beginners-cgi@perl.org
Subject: Running a DOS app under iIS?

Hi

I am having trouble getting a DOS executable program to run from my PERL
script. I have been successfully running the scripts under apache 2.0 and
ActivePERL 5.8 on my XP box, with both the local client and remote clients.
When I uploaded the script to my webhost which run IIS5 I get an "Access
Denied". The webhost's support have been unable to help me.

I have am now trying it out on my IIS5.0 on Windows 2000, and although I am
not getting the same error message, my application is not running as
expected.

I thought it might be easier to use a different DOS program than my app in
case it was the problem so I have been trying the old faithful pkunzip.exe
and am getting some unexpected results.

If you start pkunzip at a command prompt without any parameters eg
c:\>pkunzip then you get a help message sent to stdout..

To test an archive you start PKUnzip
c:\pkunzip -t myzip.zip
and if the zipis is ok then a message verify the integrity of the zip is
sent to stdout.

Various version of my PERL script to start PKUnZip have been

#!c:\perl\bin\perl.exe -w
#unzip.pl
print "Content-type:text/html\n\n";
system("pkunzip")
print "<html>" ;
system("pkunzip.exe -t myzip.zip")
print "Done" ;
print "</html>" ;

The only output is "Done":

changing the System line to:
system("cmd /c pkunzip.exe");
is far better as I receive the expected Help message

I eventually got at least something along the lines I wanted with  with:
system("cmd","/c","pkunzip.exe","-t",
"c:\\inetpub\\wwwroot\\cgi-bin\\myzip.zip")
However although it can fine the myzip.zip file the error message coming
from PKUnzip is that is can't open it?

I can run the script from the Command Prompt by just type zip.pl and it runs
fine.

Can anyone shed some light on this.

By the way, I think I mentioned it earlier but I have no problems when
running this under Apache.

Thanks
Brian





 ########################################
####################################
####
This message is intended only for the use of the persons ("The intended reci
pients") to whom it is addressed. It may contain information which is privil
eged and confidential within the meaning of applicable law. If you are not t
he intended recipient, plea
se contact the sender as soon as possible. The views expressed in this commu
nication may not necessarily be the views held by James Jones & Sons Ltd.
 ########################################
####################################
####

Report this thread to moderator Post Follow-up to this message
Old Post
Michael Coats
11-22-04 08:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PERL CGI Beginners archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:35 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.