Vasiliy Sergeev
2007-Nov-13 13:50 UTC
[Xapian-discuss] problem with add_document() in php-binding for xapian 1.0.4
Hi All, I worked with xapian 0.9.10 and now decided to use xapian 1.0.4 with php5.2.2 on RHEL4 x86_64. Xapian core and php-binding were successfully installed. But simple test for adding docs to database caused segmentation fault. code: <?php set_time_limit(0); $_xapianDB = Xapian::flint_open("database", Xapian::DB_CREATE_OR_OPEN); $xapianDoc = new Xapian_Document(); $xapianDoc->add_value(1, 1000); $xapianDoc->add_posting('1000', 1, 100000); try{ $_xapianDB->add_document($xapianDoc); } catch (Exception $e) { echo "saving document exception: ". $e->getMessage(). "\n"; } $_xapianDB->flush(); ?> Is there anybody who met this problem too? How did you solve it? Looking forward to read your feedback, Vaso.
Daniel Ménard
2007-Nov-13 14:16 UTC
[Xapian-discuss] problem with add_document() in php-binding for xapian 1.0.4
Vasiliy Sergeev a ?crit :> $xapianDoc = new Xapian_Document();Xapian_Document (with an underscore) is not a valid xapian class (but XapianDocument is) and your code should generate a fatal error 'class not found'. Do you have anything in your code/configuration which would hide such errors? It would perhaps explain why you get a segfault (new Xapian_Document() return null and null->add_value() hangs). Just a guess... -- Daniel M?nard