Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By gkrishna on
when i use the search functionality, this is the result.
warning: Compilation failed: characters with values > 255 are not yet supported in
classes at offset 143 in search.module on line 236.
Comments
is it because i am using html
is it because i am using htmlarea module ?
--**--
krishna
Old PHP
This sounds like an outdated PHP installation. What version of PHP are you running on what platform?
PHP 4.3.1 --**-- krishna
PHP 4.3.1
--**--
krishna
aol
I'm also getting this error when building the search index. This is on php 4.3.2 so not exactly ancient. (head from 30/12-2004)
PHP version
The CVS search requires PHP 4.1+ on Unices and PHP 4.2.3+ on Windows at least for UTF-8 compatibility (that's what the php docs say), but it is possible that a higher version is needed to actually use high Unicode characters with it.
I developed the search on PHP 4.3.3 on Windows, so at least that version works.
PHP version
What is the update on this? Will no version earlier than 4.3.3 run this search?
I personally have PHP 4.3.2 running on RedHat and I get two errors upon running a search query. The first refers to offset 52 on line 257 of search.module and the second to offset 143 on line 265.
The current response is "you
The current response is "you need 4.3.3" (our documentation is being updated to reflect this) and "oof! that sucks! is someone willing to backport the new search.module to Drupal 4.5, perhaps?" and no one currently volunteering. Theoretically, if you're using the RedHat supplied PHP, you should be able to just yum, apt, or RPM an update, no?
http://disobey.com/
http://gamegrene.com/
http://www.disobey.com/
Unfortunately, I don't have
Unfortunately, I don't have direct access to the web server. As it also runs other, more "important" sites than my Drupal project, it's doubtful that they'd be willing to update the PHP and take the risk of bringing those down. I will try asking, however. Thanks for the info.
Im running php version
Im running php version 4.3.10 and get the same error
is there a fix
4.3.3?
Am I to understand that all of Drupal now requires 4.3.3? There's a big disclaimer about supporting 5.0 on the install notes but none regarding 4.3.3, which really seems kinda annoying. To realize that after upgrading and stuff.
And just for the search? This makes no sense. Seems like something that should "just work" rather than being "mysteriously the one thing that breaks completely."
Sorry, just sharing my take on this!
Probably depends on version of libpcre used
The complete error message I get is this one:
Compilation failed: characters with values > 255 are not yet supported in classes at offset 52 in /[...]/drupal/modules/search.module on line 258.
The function producing the message is preg_replace, so I guess it depends on what version of the libpcre is used.
On my localhost, where I do not get this message, I have PHP 4.3.11, using "PCRE Library Version" "4.5 01-December-2003" (quota from phpinfo()).
On a server, where I do get this message, PHP 4.3.2 using "PCRE Library Version" "3.9 02-Jan-2002", which is obviously a lot older. So I guess this is the clue here.
Note that there are the possibilities of using a version of libpcre which comes with PHP, or using a version provided by the system. The former is done on my machine, since I have libpcre 5 installed, and the latter is done on the server, where PHP has been configured with '--with-pcre-regex=/usr' and rpm reports version 3.9.
I don't know which version of PHP has what kind of version of libpcre, so I'd suggest to either recompile PHP 4.3.11 using its own libpcre, or get a recent version of libpcre, and compile PHP with that.
Also note http://www.pcre.org/pcre.txt (which linked from http://de.php.net/manual/en/ref.pcre.php)
Regards,
Milan
A quick fix
If you can't upgrade your server, you can strip out all the multi-byte characters from the search code. This patch to search.module seems to do the trick:
This is by no means the best solution, but it should work for sites that don't use unicode.
Cron runs but search index empty
I had the same error of characters > 255 and I have applied the fix above to the search module. The cron job runs successfully now but there are no records in the search_index table.
I am running PHP 4.4.1, Apache 1.3.26 and MySQL 3.23 on Windows.
Reset the variable that stores the last indexed page
That happened to me too. Seems that somehow drupal got confused and thought there was nothing left to index. In order to correct that issue you can edit settings.php to temporarily rest the node_last_cron variable so that drupal starts the indexing process from scratch.
In settings.php edit the $conf variable at the bottom of the page like this:
$conf = array(
'node_cron_last' => '0'
);
Then manually run cron once by visiting www.yousite.com/cron.php
Then undo your change to settings.php and continue running cron until you site is fully indexed. You can view the indexing progress at administer -> settings -> search.
one more fix
Thanks for the solution.
After appyling that fix I also ran into a warning that arose because the offset parameter was added to preg_match in PHP 4.3.3 and I was running 4.3.2.
Around line 753 I replaced
This:
if (preg_match('/\b'. $key .'\b/iu', $text, $match, PREG_OFFSET_CAPTURE, $included[$key])) {
With this:
if (preg_match('/\b'. $key .'\b/iu', substr($text,$included[$key]), $match, PREG_OFFSET_CAPTURE)) {
It isn't a perfect substitute, but it works.
See: http://www.php.net/manual/en/function.preg-match.php