Seg fault in PHP 5.0.3

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!


The following code causes a segmentation fault in PHP 5.0.3 debian package

public static function allreadyInDatabase( $location ) {
 $sql = "SELECT COUNT(*) FROM prefix_search WHERE location = :1";
 $db = DB_Mysql_Singleton::getInstance();
 $stm = $db->prepare( $sql );
 $res = $stm->execute( $location );
 return ( $res->getOne() == 1 );

log output:
[Tue Dec 28 09:54:26 2004] [notice] child pid 6895 exit signal Segmentation
fault (11)

I have located the error, it should be the last line.  I can do an echo
$res->getOne() and it will print 0.  I can do $num = $res->getOne(); and it
will work.
Even this will work:

if( $res->getOne() == 1 ) {
 die( "yes" );
} else {
 die( "no" );

will print "no".  But if I change it to

if( $res->getOne() == 1 ) {
 return true;
} else {
 return false;

it breaks.  I've checked the location where the function is called.

It doesn't change a thing if I use the function in any way:
 $bool = search_SearchSink::allreadyInDatabase( $location );
 search_SearchSink::allreadyInDatabase( $location );

 return search_SearchSink::allreadyInDatabase( $location );

 if( search_SearchSink::allreadyInDatabase( $location ) ) {

It allways breaks...  Is there any way to find the exact error, Get more log
info.  Is this a known bug?  Should I report it?  If so, do I send all my

 Thanks in advance,
 Rutger Claes
Rutger Claes                                                rgc@rgc.tld
Replace tld with top level domain of belgium to contact me    pgp:0x3B7D6BD6
The reason computer chips are so small is computers don't eat much.

Site Timeline