Emails detailing my efforts to use scripts on my HAL Website

Note: Sometimes the reply came under my message, and sometimes above. Even when using the
popular QuoteFix program, reading an email thread is still not what I call "user friendly".Remember: the
oldest message has the most > arrows.

This is a forwarding [ to MG ] of my original post on HALnet group and a series of emails resulting:

> >> At 09:39 AM 8/28/2003 -0500, you wrote:
> >>
> >>> Could you comment on this, please? Has the sysop made this stuff
> >>> inaccessible?
> >>>
> >>> --- Original [oldest] Message ----
> >>> From: "Mr. Smiley" <toner27@NOSPAMhal-pc.org>
> >>> Newsgroups: halpc.halnet.questions
> >>> Sent: Wednesday, August 27, 2003 5:08 PM
> >>> Subject: CGI Scripting
> >>>
> >>>> I got the counter on my webpage to work.
> >>>> I have been trying to get a "search engine" cgi script to work now
> >>>> unsuccessfully. I think the problem has to do with the location of
> >>>> certain directory path assignments, and possibly access to perl5
> >>>> compiler. The pdf file [ CGI-FAQ.pdf ] from Jeff Hupp is old as you can see all
> >>>> references are to Windows 95.
> >>>>
> >>>> stuff like this where you have to personalize :

> >>>> #BNB SAYS! put the UNIX path to where this directory is located :
> >>>> $lib = "/~toner27/public_html"; # Default path for loading
> >>>> libraries
> >>>> I don't know if this is right, I doubt if it is.
> >>>>
> >>>> When I hit the search button, the error message is "page not found'
> >>>>
> >>>> Anybody know if using this perl script is even possible on HALnet?
> >>>>
> >>>> I can show you more info if necessary.
> >>>
> >>>
> >>>
> >>> Tommy McClure
> >>> toner27AThalDASHpcDOTorg
> >>> http://www.hal-pc.org/~toner27/
> >>> ICQ: 3786772
> >>> Hm:1-713-733-2164
> >>> Pg:1-281-718-4394
> >>> Fx:1-208-474-1833
> >>>
> >>>
> >>>

This is MG's response

> ---- Original Message ----
> From: "Marilyn Wright Gore" <marilyn@spinneret.com>
> To: "Tommy McClure" <toner27AThalDASHpcDOTorg>
> Sent: Thursday, August 28, 2003 10:21 AM
> Subject: Re: Fw: CGI Scripting
>
> >> PERL scripting is still accessible for users.  I don't think Jeff
> >> updated the cgi instruction file since it was published (according
> >> to the mod date, January 1999). It's no longer linked from the
> >> HALNet support section index page for that reason.
> >>
> >> I glanced at this user's directory structure, and his cgi scripts are
> >> located in his public_html directory.  They must be in a
> >> subdirectory of public_html called 'cgi-bin' in order for the server
> >> to recognize them as scripts and execute them.  That might solve his
> >> problem.
> >>

> >>> ---
> >>> Incoming mail is certified Virus Free.
> >>> Checked by AVG anti-virus system (http://www.grisoft.com).
> >>> Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/2003
> >>
> >> Marilyn Wright Gore
> >> Web Designs of Houston
> >> http://www.spinneret.com
> >>
> >
> >
> >
> >>
> >> ---
> >> Outgoing mail is certified Virus Free.
> >> Checked by AVG anti-virus system (http://www.grisoft.com).
> >> Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/2003
>

These are my personal comments on the CGI FAQ.pdf from Jeff Hupp


> From the 1997 CGI-FAQ [by jeff]:
> 1) ftp hal-pc.org; has to be ftp www.hal-pc.org
> 2) get /usr/local/etc/httpd/conf/httpd.conf server.cfg /// this command cannot be issued.
> 3) Perl 5 is in this dir : /usr/local/bin/perl   //// I cannot get to this dir
>     Many cgi/perl scripts call for access to these restricted dirs. Jeff stated that [new?] CGI scripts should be placed in the public_html dir. The only public_html dir I can reach is my own. Isn't that correct?
> 4) Line from search_engine.cgi :
>     #BNB SAYS! put the UNIX path to where this directory is located
>     $lib = "/usr/dom/xbignose/cgi-bin/3.0"; # Default path for loading libraries
>         I don't know what is meant by "this" dir, I put search_engine.cgi into my public_html dir
>         So, this became after I changed it:
>             #BNB SAYS! put the UNIX path to where this directory is located
>             $lib = "/~toner27/public_html"; # Default path for loading libraries
> 5) The search engine I tried to use is search_engine.cgi by Selena Sol
http://www.bignosebird.com/carchive/search.shtml
>
>  

Marilyn's Comments on the above message:

FIRST -- I strongly recommend using LeapFTP as a graphical ftp client. It makes creating directories and setting permissions VERY EASY. Just right-click on a file name to get a pop-up menu that includes the CHMOD command to set permissions. http://www.leapware.com. You get a free trial of it (I think it's 60 days) to decide if you want to register it. See http://www.hal-pc.org/offers.html for a HAL member discount on registration if you decide to keep it.

> From the 1997 CGI-FAQ [by jeff]: > 1) ftp hal-pc.org; has to be ftp <http://www.hal-pc.org>www.hal-pc.org
---------
Web server was moved in 2002. Now it will only respond to www.hal-pc.org.
---------
> 2) get /usr/local/etc/httpd/conf/httpd.conf server.cfg /// this command cannot be issued.
---------
See above. Config files have been moved. The ftp server was reconfigured at the same time and for security purposes you cannot ftp into anything but your own directory tree.
---------
> 3) Perl 5 is in this dir : /usr/local/bin/perl //// I cannot get to this dir
----------
You don't need to 'get to' that directory. That information is provided so that you can set up your script configuration to POINT to it. It is usually the first line of any perl script: #!/usr/local/bin/perl
----------
> Many cgi/perl scripts call for access to these restricted dirs. Jeff stated that [new?] CGI scripts should be placed in the public_html dir. The only public_html dir I can reach is my own. Isn't that correct?
----------
You must create a subdirectory of public_html called cgi-bin. Put the .pl and .cgi files in it. Be sure to set permissions to 755 on this directory and all the .pl and .cgi files.
----------
> 4) Line from search_engine.cgi :
> #BNB SAYS! put the UNIX path to where this directory is located
> $lib = "/usr/dom/xbignose/cgi-bin/3.0"; # Default path for loading libraries
> I don't know what is meant by "this" dir, I put search_engine.cgi into my public_html dir
> So, this became after I changed it:
> #BNB SAYS! put the UNIX path to where this directory is located
> $lib = "/~toner27/public_html"; # Default path for loading libraries
-----------
See above - put all scripts and supporting libraries etc. in your cgi-bin directory. The web server is configured to look in cgi-bin directories for scripts and will not run any script that is not in a cgi-bin directory. The directory ~toner27 is an alias for /usr/users/toner27/public_html. By pointing to "/~toner27/public_html" you've actually called /usr/users/toner27/public_html/public_html -- which does not exist. Make the line read: $lib = "/usr/users/toner27/public_html/cgi-bin"
-----------
> 5) The search engine I tried to use is search_engine.cgi by Selena Sol <http://www.bignosebird.com/carchive/search.shtml>http://www.bignosebird.com/carchive/search.shtml

Sorry about the messy look, my Quotefix went nuts when I changed formats trying to get a tab inserted.

Marilyn Wright Gore
Webmaster, www.hal-pc.org

My Comments on the above

  1. [ Apparently "perl5" likes to find any scripts in the /user_name/public_html/cgi-bin/ directory, that's what all this boiled down to.
    to. The procedure failed because it couldn't find the script file:  "search_engine.cgi" ]
  2. Ref items 2 and 3 above: you don't need to "get" to the directories mentioned. You only need to specify [in the perl script page ] where they are found [on the isp server] with this statement [found in every perl script] :
    #!/usr/local/bin/perl Its almost always the same, and your isp should have the info on where it is found.
  3. Even after making the corrections to the selena sol searcher, I still could not make it work. That's why I used the Matt's search script Marilyn suggested.
  4. I cannot stress the importance of knowing the directory structure enough. If you can't find this information, you will not be able to make your scripts work. Most unix systems have a similar structure to their directories, but enough differences exist so that you can't really assume that one you find will be the same as the one you need. This was the most difficult thing for me since the information was so out of date.

Search My Site

Created on ... Oct 9, 2003

Last Modified Sunday, 11-Dec-2005 19:56:55 CST