There are 2 log messages on this problem:
preg_match() [function.preg-match]: Compilation failed: internal error: previously-checked referenced subpattern not found at offset 389 in /usr/local/www/apache22/data/gelu-tur/includes/database.inc on line 347.
and
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LEFT JOIN i18n_blocks i18n ON (b.module = i18n.module AND b.delta = i18n.delta) ' at line 1 query: SELECT DISTINCT b.* FROM blocks b LEFT JOIN blocks_roles r ON b.module = r.module AND b.delta = r.delta WHERE b.theme = 'garland' AND b.status = 1 AND (r.rid IN (2) OR r.rid IS NULL) LEFT JOIN i18n_blocks i18n ON (b.module = i18n.module AND b.delta = i18n.delta) WHERE (i18n.language ='en' OR i18n.language ='' OR i18n.language IS NULL) ORDER BY b.region, b.weight, b.module in /usr/local/www/apache22/data/gelu-tur/modules/block/block.module on line 456.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | database.inc_.patch | 1.2 KB | ludek |
Comments
Comment #1
dobeerman commentedsubscribe
Comment #2
drsnuggles commentedI'm subscribing as well. My site is unusable until this error is solved. Related issue: http://drupal.org/node/1286046
Comment #3
rasved commentedI second the problem here.
I get the same errors/warnings with fully updated Drupal (6.22).
Elevated to critical, since I have running sites which suddenly stopped working!!
R
Comment #4
dudett commentedIn the link drsnuggles provided
there's a temporary solution
On freebsd, php52-pcre uses the apache22 bundled pcre lib provided by the pcre package. I had the most recent version of pcre-8.20 installed and I had that problem. I managed to find older versions of pcre, specifically pcre-8.10 and pcre-8.12 for freebsd, and both these packages solve the problem.
So, until maintainers will change the $pattern regex that will be compatible with the latest version of pcre, there's no other option besides using an older version of pcre.
Comment #5
jose reyero commentedFrom what I've read it seems we can conclude:
1. This has been introduced by an upgrade of the PHP PCRE library (8.02?)
2. This causes PCRE expression in db_rewrite_sql() to fail, which will cause the error to be logged in most cases. But if this hook is used to actually alter the query, like i18n does, the resulting query may be wrong and cause an SQL error.
3. This can be fixed by upgrading php-pcre to latest version (8.13)
So maybe we should be moving this issue to Drupal core as it is not i18n specific (though i18n is one of the few modules that implement this hook).
Comment #6
fls commentedSame here with FreeBSD 8.2-STABLE, apache-2.2.21 and php-5.2.17. A port downgrade of /usr/ports/devel/pcre from pcre-8.20 to pcre-8.12 solved the problem --for now.
Comment #7
jose reyero commentedSo it seems clear it is a pcre library issue, nothing to do here.
See comments above about how to fix it.
Comment #8
ludek commentedI have this issue on freebsd 7.3 and php 5.2. The test server with freebsd 8.1 and php 5.3 is working properly.
because latest freebsd packages require newer pcre library than 8.12, I patched db_rewrite_sql to use drupal 5 code if preg_match failed. It's not perfect solution but it works for me.
Comment #9
drifter commentedThanks ludek, your temporary fix still works.