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




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to