Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^4: Bad File Descriptor

by Milti (Beadle)
on Oct 03, 2016 at 16:22 UTC ( [id://1173160]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Bad File Descriptor
in thread Bad File Descriptor

Thanks! I think you nailed the best solution to the problem. I added "ScriptInterpreterSource Registry' to the HTTPD Config file and everything seems to work.

Replies are listed 'Best First'.
Re^5: Bad File Descriptor
by afoken (Chancellor) on Oct 06, 2016 at 05:50 UTC

    Consider using Registry-Strict instead.

    Registry uses the default mechanism used to "start" or "open" a file, whereas Registry-Strict requires that you explicitly add a (very simple) registry entry explaining Apache how to "start-as-a-CGI" a file (see ScriptInterpreterSource). The difference is not obvious, but it prevents Apache from trying to open files not meant to be executed as CGIs.

    As long as your CGI directory just contains CGIs, there is no difference. But if you accidentally leave a *.txt or *.doc file there and issue a HTTP request for the file, Apache in Registry mode will blindly attempt to start Notepad or Wordpad/Word as a CGI, whereas Apache in Registry-Strict mode won't (and report an error instead).

    I know from experience that at least Windows NT and 2000 will make Notepad / Wordpad / Word hang when started from the Apache service. My guess is that the executable attempts to open a window, but as services generally are not allowed to interact with a Desktop, they get stuck somehow. I haven't checked a more modern Windows, but I guess the behaviour did not change.

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
      iirc, that depends on the settings you use ... even in cgi-bin you can say only execute *.pl or *.cgi instead of all files

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2024-09-16 11:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The PerlMonks site front end has:





    Results (22 votes). Check out past polls.

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.