Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^5: Bad File Descriptor

by afoken (Chancellor)
on Oct 06, 2016 at 05:50 UTC ( [id://1173378]=note: print w/replies, xml ) Need Help??


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

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". ;-)

Replies are listed 'Best First'.
Re^6: Bad File Descriptor
by Anonymous Monk on Oct 06, 2016 at 06:24 UTC
    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://1173378]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (4)
As of 2024-03-29 13:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found