I took one of the examples and tried to run against my database ls -l /data1/mail/db/cur.1 total 1129624 -rw-r--r-- 1 jwl jwl 0 2011-06-09 02:27 flintlock -rw-r--r-- 1 jwl jwl 28 2011-06-09 02:27 iamchert -rwxrwxrwx 1 jwl jwl 7258 2011-06-09 02:27 position.baseA -rwxrwxrwx 1 jwl jwl 7046 2011-06-09 02:27 position.baseB -rwxrwxrwx 1 jwl jwl 474226688 2011-06-09 02:28 position.DB -rwxrwxrwx 1 jwl jwl 5626 2011-06-09 02:28 postlist.baseA -rwxrwxrwx 1 jwl jwl 5331 2011-06-09 02:28 postlist.baseB -rwxrwxrwx 1 jwl jwl 367476736 2011-06-09 02:28 postlist.DB -rwxrwxrwx 1 jwl jwl 734 2011-06-09 02:28 record.baseA -rwxrwxrwx 1 jwl jwl 725 2011-06-09 02:28 record.baseB -rwxrwxrwx 1 jwl jwl 46923776 2011-06-09 02:28 record.DB -rwxrwxrwx 1 jwl jwl 3530 2011-06-09 02:28 termlist.baseA -rwxrwxrwx 1 jwl jwl 3439 2011-06-09 02:28 termlist.baseB -rwxrwxrwx 1 jwl jwl 230023168 2011-06-09 02:28 termlist.DB -rwxrwxrwx 1 jwl jwl 581 2010-07-18 00:36 value.baseA -rwxrwxrwx 1 jwl jwl 576 2010-07-18 00:36 value.baseB -rwxrwxrwx 1 jwl jwl 36864000 2010-07-18 00:36 value.DB php ex.php /data1/mail/db/cur.1 henry DatabaseOpeningError: Couldn't detect type of database From the ex.php file: include "/usr/share/php/xapian.php"; if ($argc < 3) { print "Usage: {$argv[0]} PATH_TO_DATABASE QUERY\n"; exit(1); } // Open the database for searching. try { $database = new XapianDatabase($argv[1]); // Start an enquire session. $enquire = new XapianEnquire($database); ... What did I miss?
On 10 Jun 2011, at 15:04, Jim Lynch wrote:> php ex.php /data1/mail/db/cur.1 henry > DatabaseOpeningError: Couldn't detect type of databaseIs the version of Xapian being used by PHP the same as the version that built the database? Lack of chert support in the Xapian behind PHP might explain that? J -- James Aylett talktorex.co.uk - xapian.org - devfort.com
On Fri, Jun 10, 2011 at 10:04:19AM -0400, Jim Lynch wrote:> I took one of the examples and tried to run against my database > > ls -l /data1/mail/db/cur.1 > total 1129624 > -rw-r--r-- 1 jwl jwl 0 2011-06-09 02:27 flintlock > -rw-r--r-- 1 jwl jwl 28 2011-06-09 02:27 iamchert[...]> > php ex.php /data1/mail/db/cur.1 henry > DatabaseOpeningError: Couldn't detect type of databaseMy guess would be that you're pulling in an older version of the PHP bindings (in particular the xapian.so compiled part) which is using a version of Xapian from before the chert backend was added. Cheers, Olly