Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

I'm not anti-Microsoft, just anti-stupid!

by ajt (Prior)
on Nov 22, 2001 at 14:58 UTC ( #126952=perlmeditation: print w/replies, xml ) Need Help??

I must first state that I don't hate Microsoft, nor do I wish any personal misfortune on Bill. In fact I've used DOS/Windows for over 10 years, and it's better now (NT/2K) than it use to be.

Recently I inherited a project that's running on NT/IIS/SAP. I don't get to change the NT/IIS bit because of SAP at the moment. Long term I will get to move the web element onto a BSD/Apache box, but for the moment I have to struggle on with NT/IIS. To make mattters worse, I'm not root on the remote IIS box, and I'm developing locally on NT/Apache!

The process is very simple, upload a single file, parse it with an XML parser to see if it's well formed, if it is POST it on to a SAP Business Connector, collect the result, and return a HTML page to the browser.

Everything works PERFECTLY on my NT/Apache box, the file goes up, you get a nice error if you try to overload it, a nice error if you send non-well-formed XML, a nice error if it can't connet to SAP, and if everything goes well, a nice HTML sucess page. It even logs things nicely to a text file.

On IIS I discovered things were not as expected (and thanks to the many Monks who helped here).

  • You can't pass anything on the shebang line to IIS, you have to hack the registry! - Taint with Perl on NT/IIS and Alternatives to Taint Checking?
  • IIS doesn't send CGI::Carp messages to the log file, but directly to the browser.
  • Lincoln's DoS protection of limiting file upload sizes, doesn't seem to do anything - the file gets uploaded, but the process seems to die.
  • IIS seems to be buffering the output, so the browser times out while things are waiting - on Apache I have things running unbuffered so I can send something to prevent a dropped connection. - Suffering from Buffering

I'm sure that some things can be fixed, but as I am forced by MS to use a GUI, the IT department fobid me from using it remotely, as the box is in the DMZ, so I have to ask to go into a freezing cold server room and log in as root locally (they don't like that either), and use the stupid IIS GUI!! is the default way of doing CGI in Perl, I've used it with Apache, EMWACS HTTPs and Netscape/iPlanet on NT, Linux and Solaris, with no problems. Yet on NT/IIS I've had no end of problems. Lincoln it's creator doesn't even have an NT box to test it with - we're working through some other NT problems as I write!

While I accept that I should go away and learn more about IIS, the fact that it's so different from anything else, does so many illogical things, and seems to heap complexity on for no good reason, doesn't make me want to use it.

I also know that I shouldn't be doing things cross-platform either....

End of rant, I feel much better now....

P.S. If anyone has any useful IIS tips I'd apreciate them....

  • Comment on I'm not anti-Microsoft, just anti-stupid!

Replies are listed 'Best First'.
(jcwren) Re: I'm not anti-Microsoft, just anti-stupid!
by jcwren (Prior) on Nov 22, 2001 at 20:23 UTC

    Yes, but you have to remember that IIS was developed with ASP in mind, not Perl. I'm not arguing IISs merits or flaws, but while Perl *does* work with IIS, it's not IISs native scripting language.

    You get the same result (a web page that a user sees), but the actions that go on behind the HTTP request are completely different. As a result of this, I don't really feel that you can compare IIS/Perl to Apache/Perl.

    And any time you bolt two components together that aren't designed to work with each other, you're bound to have problems. I would present a good example, but it's too early in the morning for me.


    e-mail jcwren

Re: I'm not anti-Microsoft, just anti-stupid!
by jarich (Curate) on Nov 24, 2001 at 11:58 UTC
    I've never used IIS so if this doesn't help, please ignore it.

    Never the less, you can tell CGI::Carp to send it's error messages to a file you specify if you want, and that might help with this point:

    IIS doesn't send CGI::Carp messages to the log file, but directly to the browser.

    You can do this by:

    use CGI::Carp qw/carpout/; use FileHandle; my $fh = new FileHandle; $fh->open("logfile.log") or die "Failed to open logfile: $!"; carpout($fh);
    Wrap this in a BEGIN block if you want to send any compilation errors to your file as well.

    Of course, if you don't like FileHandle, you can open a standard filehandle and pass that to carpout too. Read the docs.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://126952]
Approved by root
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2022-06-27 08:45 GMT
Find Nodes?
    Voting Booth?
    My most frequent journeys are powered by:

    Results (88 votes). Check out past polls.