The maximum execution time is reached, causing a fatal error. Possibly due to
recursion or an endless loop. If I set the maximum execution time to
something high enough php crashes before the limit is reached.

A fair guess is that this is related to the environment that I'm running.
Thus I'd be happy to know if there is any more details on the environment
that I can provide. Furthermore it would be interesting to hear if anyone on
OS X have come across this. 
If it can help I might be wiling to provide access to my computer.

Environment:
MBP Core Duo
OS X 10.5.6
PHP 5.2.6
ZF 1.7.7

Code:
------------------------------------------------------------------------------------------------------------
require '../library/Zend/Search/Lucene.php';

$indexDirectory = '../data/indicies/books';

try { $index = Zend_Search_Lucene::open($indexDirectory); }
catch(Zend_Search_Lucene_Exception $e) {

if ($e->getMessage() != 'Index doesn\'t exists in the specified directory.')
{ throw $e; }

$index = Zend_Search_Lucene::create($indexDirectory);
}

$doc = new Zend_Search_Lucene_Document();

$doc->addField(Zend_Search_Lucene_Field::Text('url', 'http://google.com'));
$doc->addField(Zend_Search_Lucene_Field::UnStored('contents', 'happy
content'));
$index->addDocument($doc);

echo "pre commit";

$index->commit();

echo "post commit";

------------------------------------------------------------------------------------------------------------
-- 
View this message in context: 
http://www.nabble.com/Basic-Zend_Search_Lucene-code-crashes-tp22518635p22518635.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to