Issues

ZF-7681: ZipArchive::getFromName() problem

Issue Type: Bug Created: 2009-08-25T05:50:12.000+0000 Last Updated: 2009-11-19T06:49:25.000+0000 Status: Resolved Fix version(s): - 1.9.6 (24/Nov/09)

Reporter: Michael Casey (junglefish) Assignee: Alexander Veremyev (alexander) Tags: - Zend_Search_Lucene

Related issues: Attachments:

Description

I've been putting together a search interface using Zend_Search_Lucene. I've more or less been following these instructions: http://framework.zend.com/manual/en/…

I have php_zip enabled and am running php 5.2.9-1.

When I run code that looks like this: $doc = Zend_Search_Lucene_Document_Docx::loadDocxFile($doc_filenameandpath); $index->addDocument($doc);

I am getting the following warnings:

Warning: ZipArchive::getFromName() [ziparchive.getfromname]: Invalid or unitialized Zip object in D:\wamp\www\ZendFramework-1.9.1\library\Zend\Search\Lucene\Document\Docx.php on line 61

Warning: Invalid argument supplied for foreach() in D:\wamp\www\ZendFramework-1.9.1\library\Zend\Search\Lucene\Document\Docx.php on line 62

Warning: ZipArchive::getFromName() [ziparchive.getfromname]: Invalid or unitialized Zip object in D:\wamp\www\ZendFramework-1.9.1\library\Zend\Search\Lucene\Document\OpenXml.php on line 87

Warning: Invalid argument supplied for foreach() in D:\wamp\www\ZendFramework-1.9.1\library\Zend\Search\Lucene\Document\OpenXml.php on line 88

Warning: ZipArchive::close() [ziparchive.close]: Invalid or unitialized Zip object in D:\wamp\www\ZendFramework-1.9.1\library\Zend\Search\Lucene\Document\Docx.php on line 103

NB. The nearest reference I can find to a similar problem on the issue tracker is this one: http://framework.zend.com/issues/browse/… ...but it doesn't really help much. I implemented the two patch files standard/trunk/library/Zend/Search/Lucene/Document/Docx.php standard/trunk/library/Zend/Search/Lucene/Document/Exception.php but things got worse: "Fatal error: Cannot redeclare class Zend_Search_Lucene_Document_OpenXml in D:\wamp\www\ZendFramework-1.9.1\library\Zend\Search\Lucene\Document\OpenXml.php on line 38"

Comments

Posted by Michael Casey (junglefish) on 2009-09-09T07:20:42.000+0000

Problem resolved.

I was attempting to index files of type .doc. Zend_Search_Lucene can only index files of type .docx.

Posted by Alexander Veremyev (alexander) on 2009-11-19T06:34:43.000+0000

Fixed. Correct exception is thrown now.

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts