Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-02-2007, 08:40 PM
Junior Member
 
Join Date: Oct 2007
Posts: 2
Default Problems with Zend_Search_Lucene

I've spent a few hours trying to figure this one out. I've done a lot of googl'ing but I can't seem to find anyone who has had this same problem.

First, the problem only exists on my web server (Redhat Enterprise 3). When I try it on my local Ubuntu Feisty Fawn desktop it works fine.

I get the following PHP Warnings when running the "CreateIndex.php" demo:

PHP Warning: Invalid argument supplied for foreach() in /home/garett/lucene/ZendFramework-1.0.1/library/Zend/Search/Lucene/Index/Writer.php on line 238

Repeated for every single document it tries to index.

This is the content of the index directory:

$ ls index
_0.fdt _1.fdt _2.fdt _3.fdt _4.fdt _5.fdt _6.fdt _7.fdt _8.fdt _9.fdt deletable segments
_0.fdx _1.fdx _2.fdx _3.fdx _4.fdx _5.fdx _6.fdx _7.fdx _8.fdx _9.fdx index.lock

So something is clearly going wrong during the index creation.

Then when running the search-index.php demo (modified to use the index created by CreateIndex.php) I get the following warnings:

PHP Warning: flock(): 152 is not a valid stream resource in /home/garett/lucene/ZendFramework-1.0.2/library/Zend/Search/Lucene/Storage/File/Filesystem.php on line 211

And, as you would probably guess, reports no documents indexed and no results for query.

I'm using PHP 5.2.1 on both machines (the redhat server and my ubuntu desktop).

Any ideas ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 10-02-2007, 08:55 PM
Junior Member
 
Join Date: Oct 2007
Posts: 2
Default

I figured it out. It's due to zend.ze1_compatibility_mode = On in php.ini

That really sucks because I still have old php4 scripts on that server
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 10-25-2007, 10:06 PM
Junior Member
 
Join Date: Oct 2007
Posts: 1
Default Re: Problems with Zend_Search_Lucene

I was having the same problem on a shared host. Using ini_set solved it for me:

ini_set("zend.ze1_compatibility_mode", "Off");

Good luck. Cheers.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 06:04 PM.