Hello,

I am attempting to install Search Lucene API on a CentOS 5.3 server, running php 5.1.6. However, the admin Index Statistics page appears to be calling array_fill_keys, which is not in 5.1.6, only >= 5.2. Can you advise on a solution? Am I doing something wrong? I have searched and didn't find anything reported on apparent incompatibility with 5.1.6. As an aside, I also had to download the SRPMs for PHP and recompile with --enable-utf8 because the default php in CentOS doesn't have that option configured into the binary RPMs.

Best,
Dave

CommentFileSizeAuthor
#1 luceneapi-723106-1.patch1.16 KBcpliakas

Comments

cpliakas’s picture

Title: LuceneAPI should require 5.2 and not 5.1.6 » Remove the array_fill_keys() function to break the dependency on PHP 5.2
Priority: Normal » Critical
Status: Active » Needs review
Issue tags: +6.x-2.2
StatusFileSize
new1.16 KB

Hi davetbo.

Sorry for your issues, and thanks for bringing up this dependency problem. The attached patch removes the PHP 5.2 dependency and will be applied to the 6.x-2.2 release. I am flagging the status as "needs review", and please feel free to switch to "reviewed & tested by the community" if it resolves your issue.

Regarding PHP on CentOS, I am not a fan of the RPMs they provide. Many modules (including Apache Solr) use UTF8 regular expressions seeing how Drupal is a UTF8 based CMS. The fact that the CentOS RPMs don't have this compiled in is disconcerting. I do a lot of work with Blackmesh hosting (http://www.blackmesh.com/), one of the premier Drupal hosting companies in the world, and they actually use the RPMs provided by a dude named Remi. For installation instructions, view the article at http://bluhaloit.wordpress.com/2008/03/13/installing-php-52x-on-redhat-e.... That way you don't have to mess around with SRPMs, and you can get the latest versions of PHP without having to break any RPM dependencies.

Hope this helps,
Chris

cpliakas’s picture

Status: Needs review » Fixed

After testing, this patch words as expected. Added in commit #334100.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

mdinc_org’s picture

if(!function_exists('array_fill_keys')){
function array_fill_keys($target, $value = '') {
if(is_array($target)) {
foreach($target as $key => $val) {
$filledArray[$val] = is_array($value) ? $value[$key] : $value;
}
}
return $filledArray;
}
}

А чем этот вариант не подошел?