Perl will not run exe on Windows Server 2003

C

chrisgeorgeoliver

Hi,

I'm in the process of moving my sites from an old server (Windows
Server 2000 IIS 5, Active Perl 5.6.1633) to a new server (Windows
Server 2k3 IIS 6, Active Perl 5.8).

Most scripts work, but i run into a problem when i run this:

$command = "mrsid_info.exe ../$client/$image |";

$rc = open (COMMAND, $command);

if (!$rc)
{
return;
}

while (<COMMAND>)
{
if (/\s*levels = (\d+)/) { $levels = $1 + 1; }
if (/\s*width = (\d+)/) { $width = $1; }
if (/\s*height = (\d+)/) { $height = $1; }
}

close (COMMAND);

It seems like it never runs the exe because the $levels, $width, and
$height are never assigned. Is there something in IIS 6 that prevents
scripts from running exes? I have givin Everyone full access to the
directory with the script, along with full access on the perl
directory.

I created a quick helloworld.exe that outputted a string. I then wrote
a quick perl script (titled 'tester.plx') that opened helloworld.exe
and printed out the output. It worked fine in command prompt, but not
through the browser.

I am a complete perl newbie so please be descriptive with your
responses.

Thank you for your time in advance.
 
A

A. Sinan Unur

(e-mail address removed) wrote in @g14g2000cwa.googlegroups.com:
I'm in the process of moving my sites from an old server (Windows
Server 2000 IIS 5, Active Perl 5.6.1633) to a new server (Windows
Server 2k3 IIS 6, Active Perl 5.8).

Most scripts work, but i run into a problem when i run this:

use strict;
use warnings;

missing. Please read the posting guidelines for this group to see how
you can help yourself as well as helping others help you.
$command = "mrsid_info.exe ../$client/$image |";

$rc = open (COMMAND, $command);

if (!$rc)
{
return;
} ....

It seems like it never runs the exe

And why not? How can we know? You could, of course, find out:

my $command = "mrsid_info.exe ../$client/$image";
open my $pipe, '-|', $command
or die "Cannot open pipe to read output of $command: $!";
Is there something in IIS 6 that prevents scripts from running
exes?

I don't know. That is something specific to the OS/Web Server
configuration you chose, and thus off-topic here.
I created a quick helloworld.exe that outputted a string. I then wrote
a quick perl script (titled 'tester.plx') that opened helloworld.exe
and printed out the output. It worked fine in command prompt, but not
through the browser.

perldoc -q CGI
I am a complete perl newbie so please be descriptive with your
responses.

First off, I think you are referring to Perl.

Second, if you are a newbie, you should definitely read the posting
guidelines for this group.

Sinan
 
C

chrisgeorgeoliver

Thanks for the quick reply, Sinan.
Sorry for posting without reading the guidelines, I now realize I
violated quite a few rules. Although I must say I tried to find a
solution to my problem for the last 4 days before posting here.

I changed my open (COMMAND) line to the one you suggested and when I
pull up the page it just hangs. I'm pretty sure this is a permissions
problem of some kind because this code worked on IIS 5 and therefore,
I'll take this thread over there.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top