Sirsi/SOPAC Part 5

I think that Sopac needs clean URL’s configured to function properly. To enable clean URL you are going to need to do the following. Edit the file /etc/apache2/sites-enabled/000-default.

Find the section for your document directory. Don’t get confused by editing the section that is the document root. Mine looks like.

<Directory /var/www/html>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>

Change the AllowOverride None to AllowOverride All

<Directory /var/www/html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>

Restart the apache with apache2ctl restart.

Now enable clean URLs through the Drupal interface.

Administrer->Site Config->Clean URL now enable and save configuration.

When I tried to seach I go the following error

Fatal error: Call to undefined function curl_init() in /usr/local/lib/locum/locum-client.php on line 467

A quick google search indicates that the libcurl library may not be installed. So when and checked using the command

dpkg -l “libcurl*” or you can use dpkg -l | grep libcurl

Looks like this package is installed. I find that I am also going to need php5-curl. Let’s see if I have that package.

dpkg -l | grep php5

Nope, well I better go and get it.

apt-get install php5-curl

Now restart apache by apache2ctl restart

Now we did a search again and found that there were no errors this time but no returns. Excellent!

We have searched and found nothing. What’s the prob man?

Well the problem is that we need to create indexes. Change into /usr/local/lib/insurge/tools directory and there should be a file called update-index.php. You will need to make it executable. chmod 777 update-index.php and then go ahead and run the program.

./update-index.php

You should see the following occur.

Rebuilding holds cache

Rebuilding Insurge index table

Rebuilding Facet Heap

Rebuilding the Sphinx index

Finished with maintenance tasks.

Still when I tried to search I get no results. I found that the sphinx daemon was not running.

ps -ef | grep searchd

So cd into /usr/local/sphinx/bin

./searchd

Now I got the following errors

Sphinx 0.9.8-release (r1371)
Copyright (c) 2001-2008, Andrew Aksyonoff

using config file ‘/usr/local/sphinx/etc/sphinx.conf’…
WARNING: index ‘bib_items_keyword’: preload: failed to open /usr/local/sphinx/var/data/bib_items_keyword.sph: No such file or directory; NOT SERVING
WARNING: index ‘bib_items_author’: preload: failed to open /usr/local/sphinx/var/data/bib_items_author.sph: No such file or directory; NOT SERVING
WARNING: index ‘bib_items_title’: preload: failed to open /usr/local/sphinx/var/data/bib_items_title.sph: No such file or directory; NOT SERVING
WARNING: index ‘bib_items_subject’: preload: failed to open /usr/local/sphinx/var/data/bib_items_subject.sph: No such file or directory; NOT SERVING
WARNING: index ‘bib_items_callnum’: preload: failed to open /usr/local/sphinx/var/data/bib_items_callnum.sph: No such file or directory; NOT SERVING
WARNING: index ‘bib_items_tags’: preload: failed to open /usr/local/sphinx/var/data/bib_items_tags.sph: No such file or directory; NOT SERVING
WARNING: index ‘bib_items_reviews’: preload: failed to open /usr/local/sphinx/var/data/bib_items_reviews.sph: No such file or directory; NOT SERVING
FATAL: no valid indexes to serve

To get around this problem we just ran the indexer

./indexer –all –rotate

We got the following results

Sphinx 0.9.8-release (r1371)
Copyright (c) 2001-2008, Andrew Aksyonoff

using config file ‘/usr/local/sphinx/etc/sphinx.conf’…
indexing index ‘bib_items_keyword’…
collected 137147 docs, 46.1 MB
sorted 42.2 Mhits, 100.0% done
total 137147 docs, 46079084 bytes
total 44.972 sec, 1024616.83 bytes/sec, 3049.61 docs/sec
indexing index ‘bib_items_author’…
collected 137147 docs, 5.2 MB
sorted 4.6 Mhits, 100.0% done
total 137147 docs, 5195493 bytes
total 8.478 sec, 612814.76 bytes/sec, 16176.66 docs/sec
indexing index ‘bib_items_title’…
collected 137147 docs, 5.3 MB
sorted 5.2 Mhits, 100.0% done
total 137147 docs, 5262059 bytes
total 8.688 sec, 605649.85 bytes/sec, 15785.28 docs/sec
indexing index ‘bib_items_subject’…
collected 137147 docs, 17.2 MB
sorted 14.7 Mhits, 100.0% done
total 137147 docs, 17241088 bytes
total 15.213 sec, 1133324.95 bytes/sec, 9015.22 docs/sec
indexing index ‘bib_items_callnum’…
collected 137147 docs, 1.1 MB
sorted 1.1 Mhits, 100.0% done
total 137147 docs, 1075405 bytes
total 5.395 sec, 199327.44 bytes/sec, 25420.34 docs/sec
indexing index ‘bib_items_tags’…
collected 137147 docs, 0.0 MB
sorted 0.0 Mhits, 100.0% done
total 137147 docs, 35084 bytes
total 4.149 sec, 8456.19 bytes/sec, 33056.13 docs/sec
indexing index ‘bib_items_reviews’…
collected 137147 docs, 0.1 MB
sorted 0.0 Mhits, 100.0% done
total 137147 docs, 65867 bytes
total 3.959 sec, 16635.30 bytes/sec, 34637.70 docs/sec
WARNING: failed to scanf pid from pid_file ‘/usr/local/sphinx/var/run/searchd.pid’.
WARNING: indices NOT rotated.
root@drupal:/usr/local/sphinx/bin#

Since the daemon is not running a this time it makes a kind of sense that we would get this warning.

Now to fix this problem we had to run the indexer and not include the rotate option. Let’s see if this works.

./indexer –all

Looking good.

Now run

./searchd

No errors this time.

We did get a MDB2 fetch all error and then thing we forgot to do was


mysql -u root -p < /usr/local/lib/locum/sql/locum_init.sql

 

That worked now off to the harvester.

Comments 1

  • I got a MDB2 fetch error as well:

    Fatal error: Call to undefined method MDB2_Error::fetchAll() in /usr/local/lib/locum/locum-client.php on line 284

    So, I thought maybe I had also forgot to import the locum_init.sql file. So, I ran:
    mysql -u root -p < /usr/local/lib/locum/sql/locum_init.sql

    And, got this error:
    ERROR 1114 (HY000) at line 13: The table ‘locum_facet_heap’ is full

    Any ideas what may be wrong?

Leave a Reply

Your email address will not be published.