PDA

View Full Version : help installing ksearch


gweston
07-10-2002, 05:06 PM
I am trying to install KSearch and it is driving me looney!
Could someone please verify if this settings at least look like they are correct.
Unless my cuteftp is telling me the files are writable and they are really not then I have no clue as to what else could be the problem.

Thanks


# Where you want the indexer to start (full path; end
with /)
$INDEXER_START = '/home/profess/public_html/search/ '; # re-
index

# The base url of your site being indexed
# Be sure it corresponds to the $INDEXER_START directory
(end with /)
$BASE_URL
= 'http://www.professionalreferrals.ca/public_html/index.htm
l';

# The url where ksearch.cgi is located
$SEARCH_URL
= "http://www.professionalreferrals.ca/_cgi/ksearch/ksearch.
cgi";

# The full-path of the ksearch directory (end with /)
$KSEARCH_DIR = 'home/profess/public_html/_cgi/ksearch/ '; #
re-index

############################################################
#########
###OPTIONAL INDEXER
CONFIGURATION####################################
############################################################
#########
# If you are going to run the indexer (indexer.cgi) from
the web,
# you must set @VALID_REFERERS, $INDEXER_URL and $PASSWORD.
#
# Pages from the refering domains below can only run the
indexer
@VALID_REFERERS = ("http://www.professionalreferrals.ca");

$INDEXER_URL
= "http://www.professionalreferrals.ca/_cgi/ksearch/indexer.
cgi";

don5408
07-10-2002, 06:51 PM
"Could someone please verify if this settings at least look like they are correct"

Hi. I see a few different problems with the first two variables ($INDEXER_START and $BASE_URL):

- For the $INDEXER_START variable you specified the /search directory, which I believe would only result in searching documents in and below the /search folder.

- With the $BASE_URL variable the instructions specify "end with /" (which means "leave off the index.htm")

- With the $BASE_URL variable the instructions specify "be sure it corresponds to the $INDEXER_START directory" (it doesn't)

- Your $BASE_URL value references a non-existant URL (the path /home/profess/public_html = the URL http://www.professionalreferrals.ca/ so http://www.professionalreferrals.ca/public_html would only be valid if you had created a folder named "public_html" within your public_html folder

It's my understanding that for the $INDEXER_START and $BASE_URL values they are looking for you to enter the path and URL of the directory "where you want the indexer to start", which if you want the search engine to search your entire site would be your web accessable root directory (the public_html folder, aka http://www.professionalreferrals.ca).

Try this:

# Where you want the indexer to start (full path; end with /)
$INDEXER_START = '/home/profess/public_html/'; # re-index

# The base url of your site being indexed
# Be sure it corresponds to the $INDEXER_START directory (end with /)
$BASE_URL = 'http://www.professionalreferrals.ca/';

Best o' luck
Don

gweston
07-10-2002, 07:17 PM
Thanks Don,

I changed both $indexer_start and $BASE_URL.
Same error I think the problem is the inability to create a database I am pretty sure that I have made all the folders and files 777 now just to make sure everything is writable and executable.

How about this line
# The full-path of the ksearch directory (end with /)
$KSEARCH_DIR = 'home/profess/public_html/_cgi/ksearch/ '; # re-index

look okay?...does it need a drive letter?

I don't know what else to try but I am pretty sure it is not writing the database file.

don5408
07-10-2002, 08:55 PM
"I changed both $indexer_start and $BASE_URL...Same error...I don't know what else to try but I am pretty sure it is not writing the database file."

Hi. Did you try re-running the indexer.cgi file *after* making the changes above? The fact that you have no database files is certainly a problem if not *the* problem at this point. FYI I was able to install this script OK (so at least we know that this script *can* run on HRs servers with no problem), from my experience note that after running the indexer.cgi file you should have a dozen or so files in the /database folder.

"How about this line"

That line looks OK (I'd put a / before home but I don't think that's an issue). Make sure that the indexer.cgi and ksearch.cgi files are chmod 755 (-rwxr-xr-x) so they can be executed via a browser, loadup indexer.cgi in your browser and enter the password you set in the config file. That *should* create the database (depending on how many files you have uploaded on your site it may take awhile, make sure that you allow the page to finish loading) and then you should subsequently be able to load up ksearch.cgi and use the search engine.

If you have any further problems double-check to make sure that you have uploaded all of the files (with the exception of the .gif image file) in ASCII mode, CGI scripts can be hosed if uploaded in binary mode.

Best o' luck, keep us posted!
Don

gweston
07-10-2002, 09:12 PM
Hi Don

I have run the indexer many times it stops at here,

-----
"When the indexer completes, the last line should read: Total run time: ....
Deleting existing db files:

Loading files to ignore:


Using stop words file: home/profess/public_html/_cgi/ksearch/ configuration/stop_terms.txt

Starting indexer at /home/profess/public_html"

-----

and if I change the $use_dbm = 0 to 1 then it stops at

Deleting existing db files: deleting old db files...

so it has to be not writing to the database files.

However I am sure I have made every folder writable...

Question: can I leave the $use_dbm = 1 at 1, do we have db_file on this board?

Thanks again I really appreciate your help,

Galen

don5408
07-10-2002, 10:15 PM
I take back what I said about the / in /home not being an issue...I took the initial slash off of the $KSEARCH_DIR variable and sure enough, I got the exact same failure you describe above ("it stops at Deleting existing db files: deleting old db files...")

Try changing

$KSEARCH_DIR = 'home/profess/public_html/_cgi/ksearch/ '; # re-index

to

$KSEARCH_DIR = '/home/profess/public_html/_cgi/ksearch/ '; # re-index

"Question: can I leave the $use_dbm = 1 at 1, do we have db_file on this board?"

Yes...the ONLY changes I made were to the variables in the "REQUIRED CONFIGURATION" and "OPTIONAL INDEXER CONFIGURATION" sections, everything else I left as is and it worked fine (actually better than the search engine I already had in place which may turn out to be an unexpected bonus ;-)

Hope that does it!
Don

don5408
07-10-2002, 10:25 PM
Just to review, make sure that your configuration.pl file has all of the following variables exactly as follows, paying particular attention to the slashes (both preceeding as well as trailing):

$INDEXER_START = '/home/profess/public_html/'; # re-index

$BASE_URL = 'http://www.professionalreferrals.ca/';

$SEARCH_URL = "http://www.professionalreferrals.ca/_cgi/ksearch/ksearch.cgi";

$KSEARCH_DIR = '/home/profess/public_html/_cgi/ksearch/'; # re-index

@VALID_REFERERS = ("http://www.professionalreferrals.ca");

$INDEXER_URL = "http://www.professionalreferrals.ca/_cgi/ksearch/indexer.cgi";

gweston
07-10-2002, 11:03 PM
No luck,




I posted the config portion so that you can see that it is the same...

Did you create a database\ folder or database\files I have tried both but I can't see how that could change anything..

Do you want to ftp in and take a look?



---------------------------------------------------------------

INDEXER_START = '/home/profess/public_html/'; # re-index

# The base url of your site being indexed
# Be sure it corresponds to the $INDEXER_START directory (end with /)
$BASE_URL = 'http://www.professionalreferrals.ca/';

# The url where ksearch.cgi is located
$SEARCH_URL = "http://www.professionalreferrals.ca/_cgi/ksearch/ksearch.cgi";

# The full-path of the ksearch directory (end with /)
$KSEARCH_DIR = '/home/profess/public_html/_cgi/ksearch/ '; # re-index

#####################################################################
###OPTIONAL INDEXER CONFIGURATION####################################
#####################################################################
# If you are going to run the indexer (indexer.cgi) from the web,
# you must set @VALID_REFERERS, $INDEXER_URL and $PASSWORD.
#
# Pages from the refering domains below can only run the indexer
@VALID_REFERERS = ("http://www.professionalreferrals.ca");

$INDEXER_URL = "http://www.professionalreferrals.ca/_cgi/ksearch/indexer.cgi";

gweston
07-11-2002, 11:44 AM
Hi Don,

If you get time can you go in and have a look.

I have posted the info here for now
http://www.professionalreferrals.ca/ftp.htm

don5408
07-11-2002, 04:00 PM
"Did you create a database\ folder or database\files I have tried both but I can't see how that could change anything..."

Well in the end that was the only thing left which was preventing the script from running.

To answer your question I didn't create anything in the database folder, I just uploaded the empty database subdirectory along with the rest of the files and chmod 777 to make it writable. After running the indexer I now have the 13 database files in there, but the folder was empty prior to that.

I accessed your FTP and while it clearly wasn't the *original* problem in the end the "files" subdirectory you had created in the database folder in the course of trying to troubleshoot the problem ended up adding to the problem. I *think* the problem is that the indexer script is designed to create a FILE named "files" (just "files", no extension) and was getting hung up on the fact that you had put a FOLDER named "files" in there. In any case as soon as I deleted the /files folder and the database.txt file from the database folder the indexer ran through like a champ.

Finished: Indexed 174 files (736KB) with 19037 total terms.
Total run time: 16 seconds

Note that you'll probably want to modify the ignore_files.txt file to add the paths to the directories you don't want indexed and reindex, however other than that you should be set.

Enjoy!
Don

gweston
07-11-2002, 04:16 PM
You ROCK Ye Ha!!

I figured it was the stupidist little thing.

Thanks Alot!

I learned some new things.


Galen.

don5408
07-11-2002, 05:19 PM
"I figured it was the stupidist little thing"

Isn't it always?

"Thanks Alot!"

You're welcome!

Don

gweston
07-18-2002, 02:41 PM
Hi Don,

Do you know anything about xpdf pdftotext converter...ie how to install it?

I just uploaded the linux binary...didn't seem to work.

Thanks

Galen

don5408
07-20-2002, 07:18 PM
"Do you know anything about xpdf pdftotext converter...ie how to install it?"

Hi, Galen. Unfortunately you are well outside of the realm of my limited experience with that one, sorry! If no one replies with any better suggestions you might want to submit a TT and see if HR support can possibly assist you with this.

Best o' luck,
Don

stevenpee
03-09-2005, 06:39 PM
It seems that database folder is key. I also had the same troubles untill I created a folder name database in the ksearch directory.