jsdoyle
09-03-2003, 10:17 PM
Well I finally got my old search.cgi scripts working. Here's what you will need to do if you are having the same problem.
This is assuming you have the two files search.cgi and search_define.pl.
You will also need the file cgi-lib.pl. (you can get it at http://cgi-lib.berkeley.edu/) This file was in my cgi-bin folder already.
Get the file and create a folder in your cgi-bin called "library". Put the cgi-lib.pl file in this folder.
cgi-lib.pl changes
Change line 1 to: #!/bin/perl
search.cgi changes
The file search.cgi points to cgi-lib.pl at lines 26 and 27 by saying: $lib = "/library"; # Default path for loading libraries
require "$lib/cgi-lib.pl"; Remove the leading forward slash in the "/library" statement to make it read "library".
Change line 1 of search.cgi to #!/bin/perl.
search_define.pl changes
Change lines 15 and 16 to read:
$root_web_path = "/www/htdocs/";
$server_url = "http://yourdomain.com";
Line 24 defines files and folders you want to exclude from your searches. Make sure you exclude things like your cgi-bin and other private folders. I notice my /plugins folder showed up in a search on my site so I had to add it to the list. There will probably be some others I'll have to add.
Once these changes are made the the search.cgi should work. At least it does on my site.
Some of you more tech savvy webmasters out there probably can explain this a little better and it may be that I've done something I shouldn't have. If this is the case please let me know.
Some have been reporting that perl hasn't been installed in the transition to 2.0 so make sure it's installed too.
One other thing, if you have to get the cgi-lib.pl file set it's permissions to 755. That's what mine is set to.
Hope this helps! Now off to get my Guestbooks working!
Scott
This is assuming you have the two files search.cgi and search_define.pl.
You will also need the file cgi-lib.pl. (you can get it at http://cgi-lib.berkeley.edu/) This file was in my cgi-bin folder already.
Get the file and create a folder in your cgi-bin called "library". Put the cgi-lib.pl file in this folder.
cgi-lib.pl changes
Change line 1 to: #!/bin/perl
search.cgi changes
The file search.cgi points to cgi-lib.pl at lines 26 and 27 by saying: $lib = "/library"; # Default path for loading libraries
require "$lib/cgi-lib.pl"; Remove the leading forward slash in the "/library" statement to make it read "library".
Change line 1 of search.cgi to #!/bin/perl.
search_define.pl changes
Change lines 15 and 16 to read:
$root_web_path = "/www/htdocs/";
$server_url = "http://yourdomain.com";
Line 24 defines files and folders you want to exclude from your searches. Make sure you exclude things like your cgi-bin and other private folders. I notice my /plugins folder showed up in a search on my site so I had to add it to the list. There will probably be some others I'll have to add.
Once these changes are made the the search.cgi should work. At least it does on my site.
Some of you more tech savvy webmasters out there probably can explain this a little better and it may be that I've done something I shouldn't have. If this is the case please let me know.
Some have been reporting that perl hasn't been installed in the transition to 2.0 so make sure it's installed too.
One other thing, if you have to get the cgi-lib.pl file set it's permissions to 755. That's what mine is set to.
Hope this helps! Now off to get my Guestbooks working!
Scott