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

Re: -T t t t t t o o late folks

by WebHick (Scribe)
on Apr 07, 2001 at 01:52 UTC ( [id://70622]=note: print w/replies, xml ) Need Help??


in reply to -T t t t t t o o late folks

Unfortunately, I'm having the same exact problem with CGI programs on both my laptop and my computer. I've added the -T to the registry like everyone says, but I still get the error message. Yes, I restarted my computer (and by extension, the service) after the changes were made.

I'm running Win98 with PWS on both machines, so if anyone has any suggestions, I'm all for it. As a side note, running the program from the command line with the -T works just fine. For now, I'm making do without by incrementally uploading my programs to my webhost so I can test via CGI with taint turned on, but it's a huge pain.

Update: Due to several complaints, removed signature

Sarah

Replies are listed 'Best First'.
Re: Re: -T t t t t t o o late folks
by dws (Chancellor) on Apr 07, 2001 at 01:56 UTC
    Did you remember to take the -T out of the #! line after you added it to the registry scriptmap?

    If that doesn't resolve the issue, you many need to use the Internet Service Manager to edit the scriptmap.

      Yes, taking the -T out of the #! line will allow the program to run, but unfortunately, it also doesn't taint check.

      I know that sounds really arrogant, but I tested this out. I created a tiny little file that purposely causes taint to scream:
      #!perl -wT use strict; my $bad_stuff = $ENV{HOME}; system($bad_stuff);

      I'm probably rehashing old news, but my testing shows that taint will puke over this whether or not the -T is in the #! line as long as perl is called with -T. But if I run it in the browser without the -T in the #! line, taint doesn't make a peep. This is all while the -T is still in the registry. But I'm probably misunderstanding the situation...

      Update: Due to several complaints, removed signature

      Sarah

        I assume you've given the script a .cgi extension, and that you've located the W3SVC\Parameters\scriptmap in the registry, and have added -T to the value for the .cgi key, and that you've stopped and restarted IIS (or rebooted, for good measure).

        If all this is the case, then you should see -T puking on your script when you invoke it through the browser.

        I get "Too late for -T" when I also have -T in the #! line, but this may be Perl version-dependent behavior (I'm pretty far out of date on one box. This is probably a good excuse to upgrade.)

        I solved the problem and have no experience in Perl or IIS (I guess now I have a little) All you have to do is this: Relates to IIS 5 or higher using ActivePerl 5.x for Win32 using ISAPI. Go into the properties of CGI virtual directory.. Click "Configuration" button on the Virtual Direcotry tab Click on your .pl extension and click edit Edit the line to reflect C:\perl\bin\perl.exe -T "%s" %s Apply changes.
      what do you mean by add it to the registry?
        I probably should have said "after you added it to the scriptmap."

        There are two ways to edit the scriptmap. The common one is to use one of the registry editing tools (e.g., regedit) and then to restart IIS (and reboot if you're on Win98!)

        The less common way is to use the Internet Service Manager, which makes you jump through five hoops to find where to access to the scriptmap.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2024-04-23 15:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found