This error is tied to the PHP installation, and I overlooked it in my requirements checking. I will make sure to add it to hook_requirements() as well as the project page. More information can be found regarding this requirement in the Zend Framework documentation, specifically in section 46.6.3. UTF-8 compatible text analyzers.
Most installations have this option compiled by default, but from my research there are a couple of gotchas that could cause problems. Although I can't say with certainty that this is the solution, make sure that PHP is compiled without the "--with-pcre-regex" flag and with the "--enable-utf8" flag. Again, I am not certain if this will work, but a quick Google search backed up this solution.
"Although I can't say with certainty that this is the solution, make sure that PHP is compiled without the "--with-pcre-regex" flag and with the "--enable-utf8" flag. Again, I am not certain if this will work, but a quick Google search backed up this solution."
This does not appear to be sufficient. However, I'm having difficult figuring out what IS sufficient.
I welcome and appreciate any help with solving this error. Thanks!
Apparently, my server guys won't let me get this kind of support. Does anyone have any tips to patch/hack this module to let it work well without Unicode PCRE support? :(
I think a big issue here is that Drupal is a UTF8 platform, so using a non-UTF8 analyzer may cause issues. Search Lucene API is pluggable to use alternative analyzers, but there are sill PCRE regex patterns in other places in the module which I do not want to remove. I know that Apache Solr Search Integration uses PCRE regular expressions in its code along with many other modules on D.O. Respectfully marking as "won't fix", since a "fix" would most likely cause bigger issues. I actually tried this before with some success, but as soon as someone added a UTF8 character to node it would not index any of it's text. Would love to hear of anyone who comes up with a working solution, though.
"Utf8Num analyzer needs PCRE unicode support to be enabled. Error thrown in /../sites/all/modules/luceneapi/lib/Zend/Search/Lucene/Analysis/Analyzer/Common/Utf8Num.php on line 61."
It was working fine. On cron the site slowed down to a crawl, and this error message started showing.
Tried, clearing the cache wiping the index, and re-indexing the site, which resulted in tens of these error messages, one below the other.
Don't know what is going on, but had to uninstall the module for now. How do I stop the error message from showing on the front-end?
What could be going on?
The Unicode-library is PHP Mbstring Extension on Apache.
Edit: after uninstalling normal search is not returning any results anymore, even after re-indexing the site normally.
update: the reason the normal search is not working is that the search block is still pointing to Lucene Api, even though it is not installed anymore.
update: the reason the normal search was not working, was because I set the search path manually in the adjusti module settings for the block. So that's fixed now.
The code that produces this error is the following:
if (@preg_match('/\pL/u', 'a') != 1) {
// PCRE unicode support is turned off
// require_once 'Zend/Search/Lucene/Exception.php';
throw new Zend_Search_Lucene_Exception('Utf8 analyzer needs PCRE unicode support to be enabled.');
}
Seems odd to me that this would just stop working, so I would make 100% sure your OS + web layer didn't change. In addition, I would do some debugging surrounding the code above to see why it is failing.
Any information you can give on your setup to help determine whether this is a bug or whether the system doesn;t support UTF8 PCRE? If the system doesn't support UTF8 PCRE, then the issue cannot be resolved due to a limitation of the Zend Framework components.
Neubreed's link helped updating PCRE on CentOs 5.5, but only restarting Apache was not enough, I booted the whole server and the error went away. Having the php flag "--with-pcre-regex" and not having "--enable-utf8", contrary to what was suggested on #1, doesn't seem to matter.
Comments
Comment #1
cpliakas commentedHi voipfc.
This error is tied to the PHP installation, and I overlooked it in my requirements checking. I will make sure to add it to hook_requirements() as well as the project page. More information can be found regarding this requirement in the Zend Framework documentation, specifically in section 46.6.3. UTF-8 compatible text analyzers.
Most installations have this option compiled by default, but from my research there are a couple of gotchas that could cause problems. Although I can't say with certainty that this is the solution, make sure that PHP is compiled without the "--with-pcre-regex" flag and with the "--enable-utf8" flag. Again, I am not certain if this will work, but a quick Google search backed up this solution.
Thanks for reporting this,
Chris
Comment #2
cpliakas commentedMarking this issue as by design because Search Lucene API is correctly catching the error, but I am creating another task to add this check to hook_requirements(). #590732: Add mbstring check, iconv check and PCRE unicode support check to hook_requirements().
Thanks viopfc,
Chris
Comment #3
pwilson commentedHad this issue on a mediatemple (dv) server - followed instructions here:
http://wiki.habariproject.org/en/Installation_on_Media_Temple#PCRE_Unico...
Basically, PCRE didn't have a configuration option set.
Comment #4
MadtownLems commented"Although I can't say with certainty that this is the solution, make sure that PHP is compiled without the "--with-pcre-regex" flag and with the "--enable-utf8" flag. Again, I am not certain if this will work, but a quick Google search backed up this solution."
This does not appear to be sufficient. However, I'm having difficult figuring out what IS sufficient.
I welcome and appreciate any help with solving this error. Thanks!
Comment #5
MadtownLems commentedApparently, my server guys won't let me get this kind of support. Does anyone have any tips to patch/hack this module to let it work well without Unicode PCRE support? :(
Comment #6
cpliakas commentedI think a big issue here is that Drupal is a UTF8 platform, so using a non-UTF8 analyzer may cause issues. Search Lucene API is pluggable to use alternative analyzers, but there are sill PCRE regex patterns in other places in the module which I do not want to remove. I know that Apache Solr Search Integration uses PCRE regular expressions in its code along with many other modules on D.O. Respectfully marking as "won't fix", since a "fix" would most likely cause bigger issues. I actually tried this before with some success, but as soon as someone added a UTF8 character to node it would not index any of it's text. Would love to hear of anyone who comes up with a working solution, though.
Thanks,
Chris
Comment #7
Anonymous (not verified) commentedI'm getting these errors?
"Utf8Num analyzer needs PCRE unicode support to be enabled. Error thrown in /../sites/all/modules/luceneapi/lib/Zend/Search/Lucene/Analysis/Analyzer/Common/Utf8Num.php on line 61."
It was working fine. On cron the site slowed down to a crawl, and this error message started showing.
Tried, clearing the cache wiping the index, and re-indexing the site, which resulted in tens of these error messages, one below the other.
Don't know what is going on, but had to uninstall the module for now. How do I stop the error message from showing on the front-end?
What could be going on?
The Unicode-library is PHP Mbstring Extension on Apache.
Edit: after uninstalling normal search is not returning any results anymore, even after re-indexing the site normally.
update: the reason the normal search is not working is that the search block is still pointing to Lucene Api, even though it is not installed anymore.
update: the reason the normal search was not working, was because I set the search path manually in the adjusti module settings for the block. So that's fixed now.
Comment #8
cpliakas commentedHi design_dolphin.
The code that produces this error is the following:
Seems odd to me that this would just stop working, so I would make 100% sure your OS + web layer didn't change. In addition, I would do some debugging surrounding the code above to see why it is failing.
Thanks,
Chris
Comment #9
cpliakas commentedFor additional information, see http://framework.zend.com/manual/en/zend.search.lucene.charset.html. Make sure PCRE wasn't disabled on your stack.
Comment #10
Anonymous (not verified) commentedThank you. I appreciate it.
I'll look into this.
Comment #11
franzkewd commentedGot that error too (#7). Got to uninstall for now.
Comment #12
cpliakas commentedfranzkewd,
Any information you can give on your setup to help determine whether this is a bug or whether the system doesn;t support UTF8 PCRE? If the system doesn't support UTF8 PCRE, then the issue cannot be resolved due to a limitation of the Zend Framework components.
Thanks,
Chris
Comment #13
neubreed commentedIf you need info on enabling Unicode Support on CentOS 5.2 with PHP and PCRE I found this needle in a haystack:
http://chrisjean.com/2009/01/31/unicode-support-on-centos-52-with-php-an...
The errors have stopped for me.
Comment #14
cpliakas commentedneubreed,
Thanks so much for posting the link!
~Chris
Comment #15
cpliakas commentedMarking a closed after a long period of inactivity.
Comment #16
ken hawkins commentedFWIW the link via @neubreed worked like a charm to add support to our CentOS server on the Rackspace Cloud.
Comment #17
kari.kaariainen commentedNeubreed's link helped updating PCRE on CentOs 5.5, but only restarting Apache was not enough, I booted the whole server and the error went away. Having the php flag "--with-pcre-regex" and not having "--enable-utf8", contrary to what was suggested on #1, doesn't seem to matter.