esmith

Member
Oct 16, 2001
22
0
301
The search features is not working with a site. I have not worked with the feature much before and I thought it worked. What happens is the .searchindex and .searchblurb files are created but all the searches return nothing. I copied and pasted the HTML right out of cpanel. Even the search returns nothing when done within cpanel. Please help.

Ed

PowerSurge
 

Drake

Well-Known Member
Nov 9, 2001
83
0
306
New Jersey
cPanel Access Level
DataCenter Provider
Hi.
I\'ve had good success with entropysearch.cgi, both in operating it as it is supplied with Cpanel, from the cgi-sys directory, and also in modifying the entropysearch.cgi script and relocating it in the customer\'s actual cgi-bin directory, which allowed me to \"hard code\" the username and the absolute path so the customer\'s unix username doesn\'t need to be revealed in the search form\'s html source code. (yes, a security concern).

Ok, however, not being able to see what you are using in your search form, I can only speculate that something has gone a-foul.

Feel free to look at a test sample of a search form that I slapped together. http://www.duraserver.com/search.htm
and use the source code, but adjust it as needed for your own site\'s name and address.

Now, as far as re-indexing the search engine\'s database, consider allowing your customer an easy way in accessing CPanel\'s \"indexsearch.htm\" from a web page instead of having to sign into CPanel and navigate to the search update option. The following works in generic situations, unless you made a custom bastardized Cpanel theme.

http://SITE-NAME.com:2082/frontend/THEME-NAME/cgi/indexsearch.html

Anyone attempting to access such a URL would still be required to know the username and password to access anything inside port 2082. I suppose you could also set up a cron-job to do this periodically if desired, but why bother. Just tell the customer to do it.

Feel free to get back to me with any of your specifics as to the problems you\'re having. I also dropped you an e-mail about this too.

Drake--
DuraServer.Net
 

esmith

Member
Oct 16, 2001
22
0
301
I\'m using the same code for the search page as your page does with username. I have checked and both .seachindex and .searchblurb are created when a rebuild is issued. Nothing returns though when i do a search. I get the page that says no matches.
 

Drake

Well-Known Member
Nov 9, 2001
83
0
306
New Jersey
cPanel Access Level
DataCenter Provider
Sorry I took time to reply. I was away.

OK, so you &are& getting the search results page coming up? right? That in itself says that you are successfully executing the entropysearch.cgi file. Or else you would get an error.

Is there anything strange with your usernames and their home directories that is out of the ordinary? Probably not because the searchindex & blurb are being created. OK, are they being created in the correct place?... namely in the user's home directory? OK, fine.. If you &cat& or &pico& those files, are they empty? or full of indexed stuff?

You &are& running the html form source code from a web page located within the same customer's public_html directory? right?

I wonder.. what are the file &ownerships& of the html file containing the form query lines? and other files & directories, such as searchindex and blurb? Are they the same ownership as the customer's account user name?

Does this problem only exist with &one& customer's account, or does it happen with other customers' accounts on the same server? (Trying to narrow down the cause, by process of elimination).

Also wondering if your &entropysearch.cgi& file has become damaged? Do you have another copy of it you can put in there in its place? it's located in: /usr/local/cpanel/cgi-sys/

Additionally, ... I believe your /cgi-sys/ &alias in your apache config file &is& correct, or else you wouldn't even access the entropysearch.cgi file at all, like mentioned above.

If you still can't get it going, let me know and I will give you a copy of my modified entropysearch.cgi file that I took apart and hard coded the username, etc. That modified file goes into the customer's own cgi-bin directory. With my modification, the customer's unix user name is never revealed in the results page's URL address line, nor in the html source code of the search page.

Check out an example of it at this customer's URL:
http://www.respondambulance.com/search.htm

Also check out how we gave the customer an easy quick way to perform re-indexing through his web site, without navigating through CPanel.
http://www.respondambulance.com/searchupdate.htm
Naturally, the customer doesn't link that page on his site !! He just keeps a shortcut stored in his browser's bookmarks.

Good Luck
...Drake
DuraServer.Net
 

esmith

Member
Oct 16, 2001
22
0
301
follow-up

We thought the original problem was related to ownership but we fixed all that by deleting the account and recreating in web-host-manager.

The search form is in the public_html with the same ownership as the .seach* files. When I build the indexes they show as being run by the username for the site. The only thing here is that when you run rebuild index the output page shows this...

[94% Complete]
[95% Complete]
[96% Complete]
Connection Timeout

This is always the case, everytime you rebuild site. The last line stops at 96% and says Connection Timeout.

The .search* files when you view them have what looks to be good things in them and when you grep .searchblurb for a word there are hits.

I can't really say if it is all customers as this is the first to try and get it working on this server.

I checked the entropyseach.cgi file and it seems to be good, but I would be glad to try yours that hard codes things. Anything to get this working, I'm willing to try.
 

Drake

Well-Known Member
Nov 9, 2001
83
0
306
New Jersey
cPanel Access Level
DataCenter Provider
Hi again.

Do you know if any other cgi programs are working on that server?

You can use a cgi-test script such as this one:

Place it in your cgi-bin directory and name it as desired..
such as test-diag.cgi or something like that.
Make it executable, and then run it from a web browser.
It will let you know that your cgi is working ok.

(I hope this script shows up ok while posting it to this bulletin board)


#!/usr/bin/perl
print &Content-type: text/html\n\n&;
foreach $item (keys %ENV)
{ print &$item = $ENV{$item}&\BR& \n&; }
$rundir=`pwd`;
print &Working Directory is: $rundir&\BR&&;


Just be sure to take the \ backslashes out of the BR commands. I put them in there so the BR commands would not be interpreted by this bulletin board and removed.
 

esmith

Member
Oct 16, 2001
22
0
301
script output

The script produced server information correctly. Other items within the cgi-bin are working.

Can you think of anything else? Can I have that script that you hardcode the users and other things?