CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Win32 Programming Help:
IIS Woes...



Jul 25, 2001, 12:16 PM

Post #1 of 4 (9042 views)
IIS Woes... Can't Post

Hello all.

I've been running Activestate Perl with Apache for a little over a year now on the Intranet server at my company.

My boss finally decided to get the internal site off of the old w95 box, and give me an NT Server for the internal site...

This is all well and good, but I've only ever dealt with Apache as a web server...

Here's my problem: I've set up IIS(4.0) to use "C:\Perl\bin\perl.exe %s %s" for anything with a .pl extension, also killed buffering in the "App Options" tab of the little manager wizard thingy (technical term)... When I do this, my programs do exactly what they're supposed to do... Except for read files... Kinda need to be able to read my input files, or I get no output other than the skeleton of the page with an error message that I built into the script(s)...

So, I set permissions up in the directories for read and execute for IUSR_computername, as well as for "Everyone". Tried running the scripts again...
Same cool little message that says "Couldn't open your data file". So, although I'm proud that my error handling works as it should, I'm stumped as to why the server can't read the datafiles...

I tried running the script from DOS, and it works great, so...
Anyway, I spoke to my sysadmin, and he replied with a heartfelt "I have no idea". ...which is why they pay him the big bucks...

So from there I consulted several web pages...
Just for fun, I decided to try ISAPI instead of .exe...
It read my data files, and no more cool little error messages...

So, still migrating and testing and doing other real cool things like trying to set DSN's up for some other scripts to read Access databases, like they used to be able to do from apache by just generating a generic DSN at run-time, I come across a new problem: My SSI's are producing HTTP Headers...

What the heck is that???
I searched on the 'net, including Microsoft's "Knowledge" Base. That place said to disable buffering in the App Options tab.
I already did that, a loooooong time before this problem occurred.
Then I found something somewhere that said to go into the registry and set a new value under ActiveState->PerlIS-> for EnableCGIHeader, and set this D_WORD to 0.
I do it, and the headers disappear out of my SSI's YAHOOO!!!!

Wait a minute... Will cookie's still set?
Nope... set-cookie appears at the top as if it were extra text to print.

My questions are these:
1) Why won't perl.exe read my data files, when perlis.dll will, and can that be fixed?
2) How do I REALLY get rid of the HTTP Headers on my SSI's? I mean without disabling the ability to set cookies...


That's just flippin' amazing! What's your next trick? Maybe something that actually works?


Aug 17, 2001, 11:07 PM

Post #2 of 4 (9016 views)
Re: IIS Woes... [In reply to] Can't Post

ummm.. ive gotten my scripts to work perfect on my NT server
if you hare having trouble setting up apache, then i would suggest using the foxserv install. It installs it flawlessely, as well as mySQL, php. You are however going to have to download active perl from


(im kinda tired, and didnt have the time to read your huge post, i just basically guessed at it)

visit my web site at <a href=>here</a>


Aug 18, 2001, 2:06 AM

Post #3 of 4 (9013 views)
Re: IIS Woes... [In reply to] Can't Post

I now that ISS can not work with relative paths.

You need to use in the script the full paths.
That why I use Apache on my winblow box.
Apache for windows is more ore less the same working as Apache for Linux.

I hope this will help you.


Oct 3, 2001, 2:22 AM

Post #4 of 4 (8973 views)
Re: IIS Woes... [In reply to] Can't Post

IIS does work with relative paths...

But: everyrthing is done from the WWW-root. It seams to be a bug.
You can solve it with this code. The exact details are up to you, and maybe
you can extract the $THIS_PATH variable from $0 using a regexp or small string parser. Otherwise, just set it somewhere at the top of the script.
This code could be placed in a BEGIN block

$THIS_PATH = 'path'; 
push @INC, $THIS_PATH;


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives