[Xapian-discuss] crash in PHP4 examples

David Heath david at davidheath.org
Tue Nov 8 17:25:08 GMT 2005


Olly Betts wrote:
> On Tue, Nov 08, 2005 at 04:45:56PM +0000, David Heath wrote:
> 
>>I have been experimenting with simpleindex.php in the php4 examples.
> 
> 
> Which Xapian version?  What platform?
oops.

xapian-bindings-0.9.2/
xapian-core-0.9.2/

Swig 1.3.24

Mandrakelinux release 10.2 (Limited Edition 2005) for i586

[heathd at ruby src]$ php -v
PHP 4.3.10 (cli) (built: Aug 24 2005 13:32:39)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

I built against the mandrake php RPMs.

> 
> 
>>However, the command seems to crash on exit:
>>
>>$ php simpleindex.php h < simpleindex.php
>>Segmentation fault
> 
> 
> Does "make check" in the php4 subdirectory also fail?
> 

I get:

make[3]: Entering directory `/usr/local/src/xapian-bindings-0.9.2/php4'

Warning: dl(): Dynamically loaded extensions aren't allowed when running 
in Safe Mode in /usr/local/src/xapian-bindings-0.9.2/php4/smoketest.php 
on line 22

but can't see why it would be running in Safe mode, I don't have safe 
mode on in my php.ini.

> 
>>I ran it through gdb to get a stack trace (see below). It looks to me as 
>>if the WritableDatabase may be getting deleted twice. Can this be fixed, 
>>or alternatively is there any work around?
>>
>>I'd have a look at it myself but I don't really know where to start (and 
>>my C/C++ is very basic).
> 
> 
> The latest SWIG has major updates to support for PHP, so it doesn't
> really make sense to try to track this problem down in the old generated
> code.
> 
> The snapshots are currently being generated with the old version of
> SWIG.  I'll change them to use the latest SWIG (which needs doing before
> the next release anyway) and then get you to see if this still happens
> with the latest SWIG.

Great, thanks very much.

Dave



More information about the Xapian-discuss mailing list