ZF-10085: Can't create index on 64bit os running 32bit php


When trying to create a lucene index on a 64bit Centos machine running 32bit php I get the following exception.

Fatal error: Uncaught exception 'Zend_Search_Lucene_Exception' with message 'Long integers lower than -2147483648 (0x80000000) are not supported on 32-bit platforms.' in /mypath/ZendFramework-1.10.6/library/Zend/Search/Lucene/Storage/File.php:283

Stack trace:

0 /mypath/ZendFramework-1.10.6/library/Zend/Search/Lucene/Storage/File.php(230): Zend_Search_Lucene_Storage_File->writeLong32Bit(1)

1 /mypath/ZendFramework-1.10.6/library/Zend/Search/Lucene/Index/Writer.php(199): Zend_Search_Lucene_Storage_File->writeLong(1)

2 /mypath/ZendFramework-1.10.6/library/Zend/Search/Lucene.php(559): Zend_Search_Lucene_Index_Writer::createIndex(Object(Zend_Search_Lucene_Storage_Directory_Filesystem), 1, 0)

3 /mypath/ZendFramework-1.10.6/library/Zend/Search/Lucene/Storage/File.php on line 283


Is this a problem ZF? Why run 32-bit php under 64-bit OS?

I found the problem. It appears there is an issue with php 5.3.1 or at least my build of php 5.3.1

php-5.3.1/bin/php -r 'var_dump((int)0x80000000);' int(2147483647)

php-5.3.2/bin/php -r 'var_dump((int)0x80000000);' int(-2147483648)

All working with php-5.3.2

proposing to close as wont-fix since php5.3.1 will not be supported with zf2, and it is generally wellknown that 5.3.0 and 5.3.1 are buggy.

Feel free to close this, it was more for book keeping for other users. Not using this version of PHP / ended up migrating away from Zend_Search_Lucene.