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...

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 activestate.com

foxserv-http://www.fox-hunt.net

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

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