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!

perl script and IIS

Status
Not open for further replies.

crackn101

Programmer
Dec 27, 2002
63
US
Hi Everyone.
First off, a few specs.
I am running a WinXpPro box with IIS 5.1
I have ActiveState Perl installed and running.
I have setup the extention mapping for .pl and .cgi in IIS.
My perl scripts run just fine in IIS.

My question is this:
In IIS, when i call a webpage that is generated
dynamically using perl, the page loads fine,
but it seems like maybe the perl process did not yet
terminate because the status bar in IE
( at the bottom ) is moving across as if it's
still trying to load the page.
IIS is setup to call the script like this:
c:/perl/bin/perl.exe %s

The only way i can think of to resolve this, is to
call the perl script, which will create a temporary
staic page, and then redirect to that staic page.
That way i know the script will terminate right away.

Any suggestions would be greatly appreciated.

TIA
 
Does the script reach the very end - (A print statement at the end will prove that) also I have had the same effect when the end HTML tag is missing.
Obvious I know - but it has kept me up at night.
Keith
 
Hi audiopro.
Thanks for such a quick response.
Here is my code listed below.
I have tried different variations of the code.
As you can see this is a very simple nothing
of a script. I guess that's why it bugs me so
much. :)
I thinking that maybe it's just an IIS thing.
I could use ASP instead, but I really like using perl.
And don't really want to switch.

Thanks.

<code>
#!c:/Perl/bin/Perl.exe
##
## index.pl -- This script will display the dynamic content

print "Content-type: text/html\n\n";
print "<html>\n";
print '<BODY bgColor=#eaf0ee leftMargin=0 text=#000000 topMargin=0 marginheight="0" marginwidth="0">';


print <<"EOmyPage";
<br><br>
<center>
<h2>
This is a test page only. <br><br><br>
In the future this page will contain online reports.
</h2>
</center>
EOmyPage


print "<br><center>This is the text at the bottom of the page.</center><br>\n";
print "</body>\n";
print "</html>\n";

exit;
</code>
 
This script runs fine on my machine (Win2k Adv Server,Activestate 5.6 etc)

It may be a problem with the IIS set-up -

If I look at my file-types and edit the .pl entry and go to advanced I have this

"C:\perl\bin\perl.exe" "%1" %*

I also have this setting locally - hope this helps !

Rab

 
Hi Rab.
Thanks for the suggestions.

I tried to change the perl path with the
options that your's had, but if I use anything
other than c:\perl\bin\perl.exe %s
then it stops working. Fyi I always restart IIS after
making any changes. :)
The script does work, so i guess that i should be happy.
Sometimes the status bar shows that the
page is "still loading" and sometimes not.
This page is loading up into frames, and
when it does show this, i can always click on the
same link again and the status bar disappears.

Thanks for the ideas.
 
Get a real webserver - Apache

--Paul

It's important in life to always strike a happy medium, so if you see someone with a crystal ball, and a smile on their face ... smack the fecker
 
Hey Paul.

LOL.
I wish that I could use Apache !
Personally I wouldn't give ya $10 for IIS.
Unfortunately, we just spent a bundle on a 3rd party
program that lives on IIS using ASP and SQL server.
So at this point, there's not much I can do about it.
Actually I do have apache installed. :)
I let it run for about 6 weeks with a little test page
just for monitoring connectivity.
We are hosting through DSL which stinks.
But this is an 'in-house' program so only a couple of
people will need to connect remotely.
Once we recieved the software though, IIS was setup
and the program installed.

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top