Login   Register  
PHP Classes
elePHPant
Icontem

htdir_search.php does not work

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      Htdig site indexing and searching interface  >  All threads  >  htdir_search.php does not work  >  (Un) Subscribe thread alerts  
Subject:htdir_search.php does not work
Summary:After setting htdig and downloading the package it does not work
Messages:13
Author:Mario Bittencourt
Date:2005-01-31 22:02:22
Update:2006-07-28 19:32:14
 
  1 - 10   11 - 13  

  1. htdir_search.php does not work   Reply   Report abuse  
Picture of Mario Bittencourt
Mario Bittencourt
2005-01-31 22:02:22
Hi,

I've donwloaded the htdig package from phpclasses and I am trying to make it work.

htdig itself is already install and configured. I ran rundig -v -s and it showed progress while it went indexing.

Unfortunately the htdig_search.php (after editing the htdig_path, configuration and database_directory to match the installation).

I use fedora core 3 and default htdig.rpm that comes with it (3.2.0b6).

Any ideas ?


  2. Re: htdir_search.php does not work   Reply   Report abuse  
Picture of Manuel Lemos
Manuel Lemos
2005-02-01 07:57:48 - In reply to message 1 from Mario Bittencourt
Basically you need to start telling class to create a new Ht:/Dig configuration file to index the site you want. Take a look at the htdig_setup_configuration.php script for an example of how to do that.

Then you need to tell the class to call htdig to index your site. This is something that you probably will do once a day if your site is updated every day. Take a look at the htdig_build_databases.php for an example of how to setup htdig to crawl your site.

Once your site is indexed, you can start using the class to provide an interface to search your site pages. Take a look at the htdig_search.php script for an example site search page.

  3. Re: htdir_search.php does not work   Reply   Report abuse  
Picture of Jens Potthast
Jens Potthast
2005-02-04 18:29:09 - In reply to message 2 from Manuel Lemos
Hi!
I might have been running into the same problem.
"Digging" seemes to be ok, but htdig_search.php allways returns a "Sorry no pages were found." message.
After searching for possible configuration errors near the database part - since I use de_DE locale - with no success, I inserted a "var_dump($output)" in line 86 of htdig_search.php.
It showed that my searches gave back many hits (though almost not to recognize being var_dumped), but still a "Sorry no pages were found." at the bottom of the page (of course).
$first and $last are both int(0).
Maybe in htdig-3.2.0b6 the way resulte are returned changed.
I'll be able to make some more tests soon.

Jens

  4. Re: htdir_search.php does not work   Reply   Report abuse  
Picture of Manuel Lemos
Manuel Lemos
2005-02-05 23:11:15 - In reply to message 3 from Jens Potthast
If you have generated the HT:/Dig configuration on the example htdig_setup_configuration.php script, make sure you have adjusted the options start_url, limit_urls, exclude_urls according to your own site URLs and patterns of the pages that you want to crawl.

  5. Re: htdir_search.php does not work   Reply   Report abuse  
Picture of Mario Bittencourt
Mario Bittencourt
2005-02-06 03:32:47 - In reply to message 2 from Manuel Lemos
Hi Manuel,

I got it to work by generating the configuration file with your php script.

One strange behaviour (at least for me) is that while using the htdig_search with the standard /etc/htdig/htdig.conf the output array did not come with the required fields.

I've echoed the command htdig_class uses and pasted in a command line. The search is performed but the first lines which the class seem to use to find how many pages were returned are blank.

Would be great to have a README file (or in htdig_search.php) a big notice on this behaviour.

  6. Re: htdir_search.php does not work   Reply   Report abuse  
Picture of Jens Potthast
Jens Potthast
2005-02-07 10:40:18 - In reply to message 5 from Mario Bittencourt
Hi!
Same behavior as Mario reported. Finally I got it working "his way".

Thanks again, great work!

Jens

  7. Re: htdir_search.php does not work   Reply   Report abuse  
Picture of Manuel Lemos
Manuel Lemos
2005-02-08 06:47:35 - In reply to message 5 from Mario Bittencourt
That is because the class requires that htsearch command returns the results formatted with a certain patterns, so it can parse the results and extract the relevant information. Therefore the htsearch program needs to use the supplied template files.

When you use a custom configuration file, it uses the default result pages template files, and so the class is not able to parse the result data that the htsearch program and it fails.

Anyway, you are right. This class needs better documentation. Therefore, I have just uploaded a README file. Thank you for the suggestion.

  8. Re: htdir_search.php does not work   Reply   Report abuse  
Picture of miggy
miggy
2006-07-27 11:24:38 - In reply to message 7 from Manuel Lemos
Hi, i have problem with htdig_search.php also.
It sais:
Error: the htsearch program executable could not be found at /usr/local/htdig/bin/htsearch.

but my htsearch file is in /bin directory...

What can i do to fix it?
I use Redhat, PHP, Apache

  9. Re: htdir_search.php does not work   Reply   Report abuse  
Picture of Manuel Lemos
Manuel Lemos
2006-07-27 18:32:26 - In reply to message 8 from miggy
Just set the class variable htdig_path with the correct path .

  10. Re: htdir_search.php does not work   Reply   Report abuse  
Picture of miggy
miggy
2006-07-27 22:21:23 - In reply to message 9 from Manuel Lemos
But it is already in the correct path...
i have htsearch in /usr/local/htdig/bin/htsearch
so i putted the path in php file so:

htdig.php
[code]
var $htdig_path="/usr/local/htdig/bin";
var $htsearch_path="/usr/local/htdig/bin";
var $configuration="/usr/local/htdig/conf/htdig.conf";
var $database_directory="/usr/local/htdig/var/htdig";

[/code]

I think i have given a correct path?

 
  1 - 10   11 - 13