Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > cgi_bin

Reply
Thread Tools

cgi_bin

 
 
Nick Wedd
Guest
Posts: n/a
 
      10-20-2007
When I first wrote Perl cgi scripts to run on web sites, I was told to
put them in a directory called cgi_bin. I did so, assuming either that
the name of the directory was significant, or that the cgi_bin provided
by the web host has some magic property.

As I have written more scripts and used more servers, I have come to
realise that this is not at all necessary. I can put a cgi script
wherever I like, just as I can a .gif file. There is no magic involved.

So why did books and web hosts once encourage the use of a directory
called cgi_bin? Have things changed, or was it always irrelevant where
you kept your cgi scripts?

Nick
--
Nick Wedd http://www.velocityreviews.com/forums/(E-Mail Removed)
 
Reply With Quote
 
 
 
 
Jürgen Exner
Guest
Posts: n/a
 
      10-20-2007
Nick Wedd wrote:
> When I first wrote Perl cgi scripts to run on web sites, I was told to
> put them in a directory called cgi_bin. I did so, assuming either
> that the name of the directory was significant, or that the cgi_bin
> provided by the web host has some magic property.
>
> As I have written more scripts and used more servers, I have come to
> realise that this is not at all necessary. I can put a cgi script
> wherever I like, just as I can a .gif file. There is no magic
> involved.
> So why did books and web hosts once encourage the use of a directory
> called cgi_bin? Have things changed, or was it always irrelevant
> where you kept your cgi scripts?


This is a question about which webserver you are using, how it is
configured, and best practices for structuring web sites.
It has nothing to do with Perl and you may get much better responses asking
a NG that actually deals with web servers and web sites.

jue


 
Reply With Quote
 
 
 
 
still me
Guest
Posts: n/a
 
      10-21-2007
On Sat, 20 Oct 2007 12:36:25 GMT, "Jürgen Exner"
<(E-Mail Removed)> wrote:

>This is a question about which webserver you are using, how it is
>configured, and best practices for structuring web sites.
>It has nothing to do with Perl and you may get much better responses asking
>a NG that actually deals with web servers and web sites.


Or, more directly, if you can put cgi programs in any directory on
your web server and they execute, the web server is very poorly
configured. I'd have serious questions about the abilities of the
people running the web server. In addition, There are also a lot of
aspects of having executable programs running from only one directory
that you can use to your advantage in laying out your web site (that
go away in a loose structure).

 
Reply With Quote
 
Nick Wedd
Guest
Posts: n/a
 
      10-21-2007
In message <(E-Mail Removed)>, still me
<(E-Mail Removed)> writes
>On Sat, 20 Oct 2007 12:36:25 GMT, "Jürgen Exner"
><(E-Mail Removed)> wrote:
>
>>This is a question about which webserver you are using, how it is
>>configured, and best practices for structuring web sites.
>>It has nothing to do with Perl and you may get much better responses asking
>>a NG that actually deals with web servers and web sites.

>
>Or, more directly, if you can put cgi programs in any directory on
>your web server and they execute, the web server is very poorly
>configured.


They don't execute if I just put them there - I have to chmod them to
assign execute rights.

> I'd have serious questions about the abilities of the
>people running the web server. In addition, There are also a lot of
>aspects of having executable programs running from only one directory
>that you can use to your advantage in laying out your web site (that
>go away in a loose structure).


Obviously I have the ability to keep all my executables in one directory
if I want to - but I don't see how this helps. Can you explain?

Nick
--
Nick Wedd (E-Mail Removed)
 
Reply With Quote
 
Tad McClellan
Guest
Posts: n/a
 
      10-21-2007
Nick Wedd <(E-Mail Removed)> wrote:
> In message <(E-Mail Removed)>, still me
><(E-Mail Removed)> writes
>>On Sat, 20 Oct 2007 12:36:25 GMT, "Jürgen Exner"
>><(E-Mail Removed)> wrote:
>>
>>>This is a question about which webserver you are using, how it is
>>>configured, and best practices for structuring web sites.



Note that this newsgroup is for discussing the Perl programming language.


> Obviously I have the ability to keep all my executables in one directory
> if I want to - but I don't see how this helps. Can you explain?



Please ask questions about web server configuration in a newsgroup
that has some connection with web servers.


--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
 
Reply With Quote
 
Gunnar Hjalmarsson
Guest
Posts: n/a
 
      10-21-2007
Tad McClellan wrote:
> Nick Wedd <(E-Mail Removed)> wrote:
>>> On Sat, 20 Oct 2007 12:36:25 GMT, "Jürgen Exner"
>>> <(E-Mail Removed)> wrote:
>>>> This is a question about which webserver you are using, how it is
>>>> configured, and best practices for structuring web sites.

>
> Note that this newsgroup is for discussing the Perl programming language.


So? Perl programs, intended to be run via CGI, are not very useful if
you don't know how to run them, you know.

>> Obviously I have the ability to keep all my executables in one directory
>> if I want to - but I don't see how this helps. Can you explain?

>
> Please ask questions about web server configuration in a newsgroup
> that has some connection with web servers.


Any suggestions? The FAQ suggests comp.infosystems.www.authoring.cgi,
which has been out of order for over a year.

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
 
Reply With Quote
 
Lars Eighner
Guest
Posts: n/a
 
      10-21-2007
In our last episode, <(E-Mail Removed)>, the lovely and
talented Gunnar Hjalmarsson broadcast on comp.lang.perl.misc:

> Tad McClellan wrote:
>> Nick Wedd <(E-Mail Removed)> wrote:
>>>> On Sat, 20 Oct 2007 12:36:25 GMT, "Jürgen Exner"
>>>> <(E-Mail Removed)> wrote:
>>>>> This is a question about which webserver you are using, how it is
>>>>> configured, and best practices for structuring web sites.

>>
>> Note that this newsgroup is for discussing the Perl programming language.


> So? Perl programs, intended to be run via CGI, are not very useful if
> you don't know how to run them, you know.


>>> Obviously I have the ability to keep all my executables in one directory
>>> if I want to - but I don't see how this helps. Can you explain?

>>
>> Please ask questions about web server configuration in a newsgroup
>> that has some connection with web servers.


> Any suggestions? The FAQ suggests comp.infosystems.www.authoring.cgi,
> which has been out of order for over a year.


So, run them from the command line. You complain that nameless authors of
nameless books recommend putting scripts in "cgi_bin" --- why do you not ask
those authors?

Frankly, I do not know why authors would give you that advice. The default
configuration for most of the servers in use on the web defines the script
alias directory as "/cgi-bin/" and since a hyphen is not an underscore, I
do not know where your authors got their advice.

--
Lars Eighner <http://larseighner.com/> <http://myspace.com/larseighner>
Countdown: 457 days to go.
What do you do when you're debranded?
 
Reply With Quote
 
Gunnar Hjalmarsson
Guest
Posts: n/a
 
      10-21-2007
Lars Eighner wrote:
> In our last episode, <(E-Mail Removed)>, the lovely and
> talented


Oh, I'm flattered.

> Gunnar Hjalmarsson broadcast on comp.lang.perl.misc:
>
>> Tad McClellan wrote:
>>> Nick Wedd <(E-Mail Removed)> wrote:
>>>>> On Sat, 20 Oct 2007 12:36:25 GMT, "Jürgen Exner"
>>>>> <(E-Mail Removed)> wrote:
>>>>>> This is a question about which webserver you are using, how it is
>>>>>> configured, and best practices for structuring web sites.
>>> Note that this newsgroup is for discussing the Perl programming language.

>
>> So? Perl programs, intended to be run via CGI, are not very useful if
>> you don't know how to run them, you know.

>
>>>> Obviously I have the ability to keep all my executables in one directory
>>>> if I want to - but I don't see how this helps. Can you explain?
>>> Please ask questions about web server configuration in a newsgroup
>>> that has some connection with web servers.

>
>> Any suggestions? The FAQ suggests comp.infosystems.www.authoring.cgi,
>> which has been out of order for over a year.

>
> So, run them from the command line. You complain that nameless authors of
> nameless books recommend putting scripts in "cgi_bin" --- why do you not ask
> those authors?
>
> Frankly, I do not know why authors would give you that advice. The default
> configuration for most of the servers in use on the web defines the script
> alias directory as "/cgi-bin/" and since a hyphen is not an underscore, I
> do not know where your authors got their advice.


Excuse me, Lars, but who are you talking to?

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
 
Reply With Quote
 
Charlton Wilbur
Guest
Posts: n/a
 
      10-21-2007
>>>>> "NW" == Nick Wedd <(E-Mail Removed)> writes:

NW> Obviously I have the ability to keep all my executables in one
NW> directory if I want to - but I don't see how this helps. Can
NW> you explain?

As has been explained to you at least twice, the use of a cgi-bin
directory is entirely a question of web server configuration, and has
nothing whatsoever to do with Perl specificially. The answer would be
the same if the executables in the the cgi-bin directory were written
in C or Java or INTERCAL. So ask for explanation in a newsgroup or on
a mailing list where web server configuration is on topic.

(Your inability to find such a forum that will answer your question is
not justification for asking it here, either.)

Charlton


--
Charlton Wilbur
(E-Mail Removed)
 
Reply With Quote
 
Gunnar Hjalmarsson
Guest
Posts: n/a
 
      10-21-2007
Charlton Wilbur wrote:
>>>>>> "NW" == Nick Wedd <(E-Mail Removed)> writes:

>
> NW> Obviously I have the ability to keep all my executables in one
> NW> directory if I want to - but I don't see how this helps. Can
> NW> you explain?


<snip>

> (Your inability to find such a forum that will answer your question is
> not justification for asking it here, either.)


Even if we don't know anything about the OPs ability in that respect,
I'd say that the lack of a more appropriate Usenet group _does_ justify
him asking it here.

Quoted from "perldoc -q usenet":

"Use comp.lang.perl.misc for topics which do not have a more-appropriate
specific group."

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments