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.
Fatal error: Class 'MergeQuery_mysql' not found in /home/int/public_html/drupal7.infonoticias.eu/public/includes/database/database.inc on line 721 Fatal error: Class 'MergeQuery_mysql' not found in /home/int/public_html/drupal7.infonoticias.eu/public/includes/database/database.inc on line 721
Comment | File | Size | Author |
---|---|---|---|
#25 | tokenizer-3.patch | 2.75 KB | c960657 |
#23 | registry_skip_string.patch | 666 bytes | chx |
#22 | tokenizer-2.patch | 1.24 KB | c960657 |
#18 | tokenizer-1.patch | 1.1 KB | c960657 |
#7 | 368116-php-tokenizer-weirdness.patch | 603 bytes | Damien Tournoud |
Comments
Comment #1
int CreditAttribution: int commentedMySQL 5.0.67
PHP 88M
PHP 5.2.6-2ubuntu4
Apache/2
Comment #2
int CreditAttribution: int commentedI think that, sometimes work...
Comment #3
Dave ReidCan you reproduce the steps to get this error?
Comment #4
int CreditAttribution: int commentedJust navigate to http://drupal7.infonoticias.eu/
Comment #5
Dave Reid1. Double check that all the files copied correctly. There should be a file called database.inc inside your drupal/includes/database/mysql folder.
2. Did you change anything before this error started appearing?
Comment #6
c960657 CreditAttribution: c960657 commentedI see this frequently with PHP 5.2.0 on Debian Etch. Apparently the tokenizer gets the following line in includes/database/mysql/query.inc wrong:
This is being tokenized like this:
I have no experience with the tokenizer, but line 12 looks wrong. This makes _registry_skip_body() consume the rest of the file, so the remaining classes are not properly detected and stored in the registry.
Changing the offending line to this appears to fix the problem:
The user comments on the manual page for token_get_all() indicates that the tokenizer has some bugs/weirdnesses.
Comment #7
Damien Tournoud CreditAttribution: Damien Tournoud commentedOn PHP 5.2.4 (Zend Engine v2.2.0), I correctly get:
So it seems that this particular version shipped with Debian Etch is really broken.
PHP lex script hasn't changed that much in the 5.2 branch [1]. The change that fixed this could be [2], which means we will have to require PHP 5.2.3. Here is a patch.
[1] http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_language_parser.y?view=lo...
[2] http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_language_parser.y?r1=1.16...
Comment #8
chx CreditAttribution: chx commentedWe can not make Drupal 7 not run on Debian Etch. This is not a solution I can accept. Sure, Lenny shipped today, it wont be another 3-4 years and every Debian user will be upped to it. We shall fix the registry.
Comment #9
int CreditAttribution: int commentedI said in post #1 that my php version is: php5 5.2.6-2ubuntu4
So the problem is other...
Comment #10
int CreditAttribution: int commentedNow give-me this error:
Fatal error: Call to undefined function field_attach_load() in /home/int/public_html/drupal7.infonoticias.eu/public/modules/user/user.module on line 218
I commented that line.
and now works fine..
Comment #11
Damien Tournoud CreditAttribution: Damien Tournoud commented@int: please make sure that you reinstalled from scratch. Updates from a development version (7.x) to another is not supported during the development cycle.
Comment #12
int CreditAttribution: int commentedI'm testing, and since 3 minutes testing, now give again this error:
I don't change nothing, just navigate in the admin backend..
My system info is:
Comment #13
int CreditAttribution: int commentedI will test re-install again from scratch today... wait for info...
Comment #14
int CreditAttribution: int commentedIt's working fine with the re-install... I don't know that we can't update from 7.x to 7.x
For me you can close this..
Comment #15
chx CreditAttribution: chx commentedMy test slave is
and it passes the test suite occassionally. So .. what's going on in #6?
Comment #16
c960657 CreditAttribution: c960657 commentedAfter a clean install, my {registry} table only contains the following 36 classes:
I haven't found a good way to reproduce the MergeQuery_mysql error yet.
Comment #17
c960657 CreditAttribution: c960657 commentedThe code in http://us2.php.net/manual/en/function.php-check-syntax.php#86466 seems able to compensate for this bug. I am not sure how much of it is necessary.
Comment #18
c960657 CreditAttribution: c960657 commentedWorkaround for the tokenizer bug. It has been tested with PHP 5.2.0.
Comment #19
c960657 CreditAttribution: c960657 commentedI have been using the patch on my HEAD checkout for the past weeks, so far without any problems AFAICT.
Comment #20
mgiffordI just got this error when installing a fresh version of D7 from CVS onto may Mac using MAMP.
I commented that out line out:
That function is there in modules/node/node.module but is it possible when a new drupal site is being launched that user.module is loaded but node.module isn't loaded yet (no nodes created??)
I gen got
Which works better, except when going http://localhost:8888/drupal-cvs/?q=user/register which gives me this error now:
So somethings amiss here.
Mike
Comment #22
c960657 CreditAttribution: c960657 commentedComment #23
chx CreditAttribution: chx commentedThis is all good, but a) you used backtick. I use apostrophe instead. b) you used two loops. One is enough.
Comment #25
c960657 CreditAttribution: c960657 commentedThe use of backtick was intentional. AFAICT the error only occurs with strings that are subject to variable substitution, i.e
"$y {"
,`$y {`
and HEREDOC strings, but not'$y {'
. I changed the while condition to something slightly more readable (I think) and added a test.Comment #26
chx CreditAttribution: chx commentedI see. Nice job.
Comment #27
Dries CreditAttribution: Dries commentedThanks -- glad to see it come with a test. Committed to CVS HEAD. Thanks.
Comment #29
Exteris CreditAttribution: Exteris commentedIssue still in the latest CVS HEAD (with sqlite3)
Comment #30
Crell CreditAttribution: Crell commentedThis is being handled over here: #684138: DatabaseConnection_sqlite->dbNextId() always returns NULL, breaking batch api, installation.
Please don't re-open long-closed issues.