I just encountered something new. I'm
doing some work at a web hosting company
where I've never ever tried to get a CGI
script working before.
The name of the hosting company I'll withhold;
however, I've been happy with them in the
past, and so I'm back again having chosen them
as the web hosting company for the website
I'm currently working on.
I asked their support team, via online chat,
why the supplied test scripts that are found
in cgi-bin are not working. Turns out
that cgi-bin needs to be enabled.
Can't say I blame them for requiring this. This
is just one more layer of defense against having
the web hosting account hijacked by the bad guys.
Here's what their support team said to me via
online chat:
CGI scripts require the cgi-bin directory to be
enabled for your site, otherwise they will not
work. To enable the cgi-bin:
- Log into your Hsphere control panel @ http://www.hosting.com/login.html
- Click on web options.
- Click on "Add" next to CGI dir
- Enter /cgi-bin as the directory alias.
- Click "Changes need to be applied".
Once you have done this, your scripts should
start working within 30 minutes.
Since this may be a layer of defense (a very
minor layer of defense) for the hosting company
in question, I've decided not to publish their
name.
However, the principle could possibly be fairly
universal. If the simplest of simple CGI scripts
does not work, it could be that CGI has to be
enabled in the web hosting account control panel.
Seems that setting up the simplest of CGI forms
can be time-consuming for this reason. In spite
of the simplicity of CGI, because of its power
and versatility, it often seems to be hobbled
in some way or another by the web hosting company.
This may be to keep the CGI folder from being obvious
to the bad guys.
Finding out how to get even the simplest CGI
script, such as FormMail, can be time-consuming
until it is realized that it is not intended
to work without intervention.
What's the lesson?
Situations that appear to be identical may not
be identical at all. Assuming that a cgi-bin
directory will actually work may not be a safe
assumption. It may turn out that what appears
to be a normal situation requires further investigation.
Each situation, no matter how similar
it may appear to be to a prior situation,
is, in reality, its own situation.
Ed Abbott
No comments:
Post a Comment