Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Taint Mode on an Old Web Server

by count0 (Friar)
on Dec 18, 2001 at 22:50 UTC ( [id://132907]=note: print w/replies, xml ) Need Help??


in reply to Taint Mode on an Old Web Server

I've never worked on an NT web server, but I can certainly tell you where to look.... in your logs! ;)

Anytime you get a 500 error, check your web server's error logs. There will be a very detailed description of exactly what went wrong.

By no means am I an expert with Windows, but perhaps it's a problem with the shebang line? My understanding is that the shebang isn't even used on Windows. Instead, it uses file extensions to determine how to run a program.
If .pl scripts are set to run with 'C:\perl\bin\perl', set up a different extension (or alter .pl's) to use "C:\perl\bin\perl -T" instead.

Replies are listed 'Best First'.
Re: Re: Taint Mode on an Old Web Server
by TGI (Parson) on Dec 18, 2001 at 23:50 UTC

    Perl does check the shebang line in Windows for commandline switches like -w and -T.

    Check your logs, if you are getting a "Too late for option -T" error, Perl is being invoked with the -T already, ie your scripts are associated to perl -T instead of just perl.


    TGI says moo

      Don't you mean that the -T option is not on the file association -- but it should be?

          -- Chip Salzenberg, Free-Floating Agent of Chaos

        My mistake, to be more clear:

        1) The -T option is not on the file association.
        2) The shebang line has -T
        3) This causes a server 500 error with the error "Too late for -T option"

        So, is this rectified by adding "-T" to the file association and removing from the shebang line?

        Thanks again!
      Okay, I am indeed getting the "Too late for option -T" error.

      Now, the file extension is set as .cgi and the file association on the NT box is set for .cgi but there is no -T option among the default execution parameters.

      So now that seems to be the problem, anyone else know why it's giving me that error despite the fact that it is not being executed with -T?
        Perl, on windows, does not care what the path to perl is in your #! line, but it will process the switches (-w -T -l -whatever).

        So, it is giving you the error (not problem, but error) because it is being executed with -T.

        Now some good server, like apache, do care about the path to perl on the #! line, but that is neither here nor there.

         
        ___crazyinsomniac_______________________________________
        Disclaimer: Don't blame. It came from inside the void

        perl -e "$q=$_;map({chr unpack qq;H*;,$_}split(q;;,q*H*));print;$q/$q;"

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://132907]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-24 05:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found