[Xapian-discuss] Re: File Descriptors

Olly Betts olly at survex.com
Mon Dec 26 21:44:05 GMT 2005

On Mon, Dec 26, 2005 at 06:39:58PM +0000, Ted Jordan wrote:
> I've just started using Xapian with PHP but I have found that 
> delete_WritableDatabase($database);
> generates a segmentation fault

This is a bug in simpleindex.php - it turns out you aren't supposed to
call delete_CLASSNAME() methods directly - they're called automatically
when PHP garbage collects the object.  By calling it directly, PHP tries
to delete the already deleted object which causes the segmentation
fault.  Just replace the call with:

$database = Null;


More information about the Xapian-discuss mailing list