Setup:
PHP Version 5.2.0-8+etch11
MySQL version: 5.0.32-Debian_7etch5-log
Drupal Version: 6.x-dev 2008-Jul-08
Using a clean installation I tried to run install.php, which worked fine until the point "Install Site" where it canceled with these errors:
* user warning: 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 ') ORDER BY fit DESC LIMIT 0, 1' at line 1 query: SELECT * FROM test_menu_router WHERE path IN () ORDER BY fit DESC LIMIT 0, 1 in /var/drupal2/includes/menu.inc on line 315.
* user warning: 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 ') ORDER BY fit DESC LIMIT 0, 1' at line 1 query: SELECT * FROM test_menu_router WHERE path IN () ORDER BY fit DESC LIMIT 0, 1 in /var/drupal2/includes/menu.inc on line 315.
I didn't have this problem with 6.2 and the previous 6.x-dev version (I think it was from Jul-05)
The generated test_menu_router is empty, that's why the errors come.
Any ideas how to get this running?
| Comment | File | Size | Author |
|---|---|---|---|
| #35 | Cookie1.PNG | 60.05 KB | Dave Sandilands |
| #35 | Cookie2.PNG | 40.91 KB | Dave Sandilands |
| #35 | Cookie3.PNG | 53.96 KB | Dave Sandilands |
Comments
Comment #1
k1tsune commentedFound the trigger for the bug (if this isn't a feature):
If the $cookie_domain is wrong, for example 'example.com', then you get this bug.
Comment #2
SolaFide001 commentedI have been having this failure to install on 6.3 over approximately 20 retries, using every technique that someone has reported to work, including the the $cookie_domain. Mine was unset (the default). I set it to the domain I am installing for, and it STILL failed with the same error.
I do think the cookie issue is very close to the problem - I deleted cookies, so that should have solved it, but it did not (using Firefox 3.0.1). However, as a final effort I changed browsers (to Konqueror, but I suspect anything new would work) and it worked perfectly.
Comment #3
om457 commentedWhat additional information is needed to debug or remedy this error? How can I help?
Drupal 6.4
OpenSolaris
php 5
mySQL client 5.0.51
FF 3.0.1
* user warning: 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 ') ORDER BY fit DESC LIMIT 0, 1' at line 1 query: SELECT * FROM menu_router WHERE path IN () ORDER BY fit DESC LIMIT 0, 1 in /users/home/mysite/web/public/includes/menu.inc on line 315.
* user warning: 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 ') ORDER BY fit DESC LIMIT 0, 1' at line 1 query: SELECT * FROM menu_router WHERE path IN () ORDER BY fit DESC LIMIT 0, 1 in /users/home/mysite/web/public/includes/menu.inc on line 315.
Comment #4
om457 commentedComment #5
ravendas commentedI started installing previous fresh versions to see where this bug first appeared, and it looks like 6.2-6.4 all have it. Installation of 6.1 was just fine, and subsequent upgrades to 6.2->6.3->6.4 worked as well. I never messed with any cookies and all installs were through IE 7. Hope that helps.
Comment #6
gurubert commentedHi, I just came accross this issue after trying to install another site bsides my default drupal site.
I have enabled $cookie_domain after reading settings.php because the new site will be served from 3 different domain names (using symlinks in the sites directory).
I got the SQL error message and finally found this bug report.
I commented $cookie_domain (unset it), deleted all previously created database tables and retried install.php and it works now.
Drupal version is 6.4
Comment #7
om457 commentedre: Drupal 6.4 and 6.1
I tried uncommenting $cookie_domain in the settings.php file and deleted the tables but your suggestion did not work for me.
What is the function of menu_router? Or more importantly, what is the problem with the mySQL query?
* user warning: 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 ') ORDER BY fit DESC LIMIT 0, 1' at line 1 query: SELECT * FROM iona_menu_router WHERE path IN () ORDER BY fit DESC LIMIT 0, 1 in /users/home/mysite/web/public/includes/menu.inc on line 315.
* user warning: 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 ') ORDER BY fit DESC LIMIT 0, 1' at line 1 query: SELECT * FROM iona_menu_router WHERE path IN () ORDER BY fit DESC LIMIT 0, 1 in /users/home/mysite/web/public/includes/menu.inc on line 315.
Comment #8
dannygoh commentedI encountered this issue with drupal 6.4 + firefox 3.0.1, tried reinstall 5 times but still that same error.
I then fire up IE-7 as Ravendas did, clear all browser caches, and it gets installed beautifully (as usual)!
I think that's something to do with the browser cache or cookies. Hope you'll try it.
Comment #9
krf commentedYes, i confirm that the last comment solved the issue for me. My browser denies all cookies per default. When enabling those for my site the install went on (had to clear database and to extract the tarball again). Thank you.
Comment #10
nevets commentedI found the error due to the install failing (did not complete) and that was due to the PHP memory limit being too low.
Comment #11
unscarred1925 commentedI have exactly the same problem as you guys and my site was down for 3 days because i can't find an answer until this post. So thanks man this is how did it.
1. Empty my database and restored them back
2. Enter www.yoursite.com/install.php and go to view existing site
3. OMG! Everything is back to normal
D 6.4
Firefox 3.0.3
Mysql 5.0.51a
Comment #12
asteffes commentedI've just run into the problem while attempting to install a multi-site installation using WAMP server and Firefox 3.03.
I'm new to Drupal, so this is a test install and I am able to drop my database and start over from scratch using I.E. 6.0; however I've heard the term "empty my database" multiple times.
Can someone please explain to me the process of "emptying' a database? Are you going through each table and deleting all rows?
Thanks in advance.
Comment #13
andypostA lot of visitors of drupal.ru site are catch this bug and everytime it happens with 6.2-6.4 fresh install using FF as browser
Comment #14
dropcube commentedthis is a duplicate of #261148: menu_masks variable is empty (race condition)
Comment #15
andypostThis is not dup - this against 6.x branch and depends on browser!
Comment #16
alexanderpas commentedIt might not be an exact duplicate of #261148: menu_masks variable is empty (race condition), however the source of this bug is exactly the same as #307937: MYSQL Syntax error on installation with pre-filled tables (and #261148: menu_masks variable is empty (race condition)), therefor confirming duplicate status.
The browser issue might be a browser-side caching issue...
Let's fix this first in HEAD, then backport to released versions.
Comment #17
reaneyk commentedI'm not so sure it's browser specific. I've been using bash and Perl scripts to kick off an install with previous versions of Drupal and now I'm running into the same problem.
Comment #18
robbt commentedWow, I'm having this exact problem as well, in both Firefox and Safari. I do get this error before the error everybody else is repeating.
Warning: Table 'database.system' doesn't exist query: SELECT filename FROM system WHERE name = 'content' AND type = 'module' in /home/www/drupal-6.4/includes/database.mysql.inc on line 128
Warning: include_once(/content.module) [function.include-once]: failed to open stream: No such file or directory in /home/www/drupal-6.4/sites/all/modules/content_taxonomy/content_taxonomy.install on line 6
Warning: include_once() [function.include]: Failed opening '/content.module' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /home/www/drupal-6.4/sites/all/modules/content_taxonomy/content_taxonomy.install on line 6
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/www/drupal-6.4/includes/database.mysql.inc:128) in /home/www/drupal-6.4/includes/bootstrap.inc on line 981
Warning: Cannot modify header information - headers already sent by (output started at /home/www/drupal-6.4/includes/database.mysql.inc:128) in /home/www/drupal-6.4/includes/bootstrap.inc on line 582
Warning: Cannot modify header information - headers already sent by (output started at /home/www/drupal-6.4/includes/database.mysql.inc:128) in /home/www/drupal-6.4/includes/bootstrap.inc on line 583
Warning: Cannot modify header information - headers already sent by (output started at /home/www/drupal-6.4/includes/database.mysql.inc:128) in /home/www/drupal-6.4/includes/bootstrap.inc on line 584
Warning: Cannot modify header information - headers already sent by (output started at /home/www/drupal-6.4/includes/database.mysql.inc:128) in /home/www/drupal-6.4/includes/bootstrap.inc on line 585
Comment #19
robbt commentedI figurted out what this was for me, it was most likely having too many modules under my sites/all/modules thus causing the script to time-out or not be able to properly add the scripts, or this was fixed in 6.5.
I tried to install without multisites without all of the modules and it worked flawlessly.
Comment #20
grendzy commentedThis bug is still occurring for me on Drupal 6.6 (which has the patch from #261148: menu_masks variable is empty (race condition) applied), so I'm not so sure it's a duplicate.
I'm using a completely unmodified D6.6 copy, with no contrib modules, and an empty database. The error was present in both Safari and Firefox.
Eventually, refreshing install.php several times allowed the install process to finish.
Comment #21
alexanderpas commentedcould you please post the exact error message you're getting now...
do you use a pre-filled your settings.php? (no input database settings when installing)
what is your memory limit?
did you clean your cookies?
I currently am unable to replicate...
Comment #22
grendzy commentedalexanderpas, thanks for your reply! I think I know what caused the error. I had an underscore in my domain name, which causes Safari to refuse the session cookie. (Sorry, I didn't save the error - Do let me know if you think there's a real issue here, and I'll try to reproduce it so I can paste the full text.)
For now I'm going to assume that this is indeed resolved. Thanks!
Comment #23
CeramicWeasel commentedThe error is as follows:
user warning: 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 ') ORDER BY fit DESC LIMIT 0, 1' at line 1 query: SELECT * FROM menu_router WHERE path IN () ORDER BY fit DESC LIMIT 0, 1 in d:\Inetpub\wwwroot\drupal\includes\menu.inc on line 315.I received this on a fresh install (default settings.ini), and repeatedly after I tweeked the settings.ini and made sure all the database info had been entered correctly.
My PHP memory limit was originally 8MB, then changed to 16MB with no success.
Cookies have been cleaned and database dropped and recreated before each retry. I've tried it in Firefox and IE6, with the same results.
The solution presented by chaosprime in http://drupal.org/node/247360 got me past the error, though it's still not finishing the install. It just stops on "Install site" with "Home" up the top of the page.
Obviously the issue is with $placeholders not being set.
Comment #24
Frank Steiner commentedI had the same problem. I was using Opera and it was not enough to enable cookies for my specific drupal server. I had to enable cookies in general, for all sites, for foreign domains, whatever. Just accepted every possible cookie. Then I dropped and recreated my drupal table in mysql. Then the installation went fine.
After the installation I could disable cookies in the global settings again (and just enable cookies for the drupal server in the per-site settings).
So it was definitely the cookies settings in the browser.
Comment #25
nikitas commentedHi there . . .
well i m having the same problem . . . and while i was trying to make it work (drupal 6.8) with firefox 3.0.5 the wrong sql syntax kept showing up no matter what . . . so i opened chrome and run it again but now . . . i get PAGE NOT FOUND . . . ? and from firefox i m stucked at home/drupal page . . .
is this something or what? come on guys i spent hours reading about drupal vs joomla and i decided to go with drupal . . . but now i see strange problems . . . ( sorry about this but no one told that i would spent 2 days and about 10 hours working only with the installation process only plus i dont know if my test site will work afterwards at the real server!)
p.s i m runnig windows xp pro +sp3 with wamp 2 on it.and i m using the system32/etc/hosts file with
127.0.0.1 http://www.drupal.gt ( as for my c:\wamp\www\drupal test site ) plus the http-vhosts file from apache.
i have installed REMOVE COOKIES as an extension with firefox but still no luck!
oh sorry . . .
I wish to all a very very very Happy new Year.
Comment #26
vaobeheer commentedWe had some same errors. We had used a script (openx advertisement) that causes the cookies to be used by drupal AND openx.
http://drupal.org/node/247039
Maybe this helps.
Comment #27
beginner commentedSee:
#2946: Login fails and no warning is issued if cookies are not enabled
#234539: Critical SQL error in installer with {menu_router}
Comment #28
cmayberry commentedI am having problems with 6.9 I think are related to this. This is the error I get when I tryot upgrade from 5.12 to 6.9. A clean istall works fine but with the upgrade one I copy over the sites folder it throw this:
Please help
Comment #29
djflux commentedI was having the same problem with 6.9. It definitely appears to be cookie-related.
I usually install Drupal directly from the drupal.org source tarball, but this time I tried the Fedora 10 RPM. In /etc/httpd/conf.d/drupal.conf there is an option to enable security cookies:
The initial install from the Fedora package has this config line commented out. I thought I'd enable it in case I was going to use SSL/TLS later. Evidently this option cause issues with not only login on a non-SSL site, but also causes the menu_router installation issue. I commented out the line again, restarted my web server and the installation then proceeded normally.
Hope this helps someone in the future/fix this bug.
Comment #30
XP-Internet.com commentedI had the same problem on a fresh install in IE, which is set to ask me for authorising cookies. Reseting settings.php, wiping the whole database and installing again with Firefox (which accepts cookies) solved the problem.
I am using Drupal 6.10. Hope this helps.
Comment #31
blup commentedI'm having this same problem right now. I'm trying to do an upgrade through IE, all cookies erased, and I get this error. I'm kind of new to this, and I already have my website files and database backed up. If I were to install this on a fresh database, could i later load the info from my current database into it? It seems most people who solve the problem is through wiping their database clean. :S
Comment #32
binford2k commentedheh. My problem here was forgetting to enable cookies in my browser. Go me.
Comment #33
jmlavarenne commentedI solved the same problem as in the first post by manually changing the connection url in the setting page from mysqli to mysql.
Comment #34
David_Rothstein commentedIt's still the case in Drupal 7 that if you don't have cookies enabled, the installer fails with similar errors (although not quite the same as the ones reported here for Drupal 6).
#791004: Installer does not warn the user that cookies must be enabled with the correct cookie domain (and fails when they aren't)
Since this is an old issue and it's hard to tell how many of the various problems here are related to cookies being disabled or not, I think it's best to use that new issue for the specific case of cookies not being correctly enabled.
Comment #35
Dave Sandilands commentedI had the same problem today in version 6.16 when doing a fresh install of a subdomain on a test pc (Win 7, XAMPP).
Using the experiences of those excellent people that had reported this problem before (many thanks to you all) I started to run through the possible solutions:
First of all I removed recently added modules (there were quite a few), deleted and recreated an empty database then ran the install - no change, same problem.
Second, I commented out $cookie_domain in settings.php, deleted and recreated an empty database then ran the install , which this time completed without any error.
However, I'm unconvinced that this is the source of the problem as I had created another subdomain less than a week ago without any problem at all. The only difference since then, apart from subdomain names, was the addition and update of a few modules in sites/all and the possibility that I used a different browser; this time I was using Flock, a variant of FireFox, I may have used FireFox the 1st time.
I checked the settings for Flock and there are cookies for both Drupal.org and my new local subdomain (see attached screenshots). To me, that means cookies are allowed (please correct me if I'm wrong), and , if so, I fail to see why commenting out $cookie_domain in settings.php should make a difference. The trouble is that it does, in this instance, so I obviously don't know much!
I hope this helps anyone that is looking into this and I would really like to know the result :)
Comment #36
pollard.tom commentedI was getting the same problem this morning on a fresh install of 6.16 with no added modules and without having made any changes to settings.php. (The $cookie_domain setting is commented out.) I'm just a newbie - I've been working through the examples in 'Using Drupal' and this problem popped up for me just today for the first time, on Chapter 9. In my case, dropping and recreating the database with a different name solved the problem.
Comment #37
pyliu8621 commentedI was still getting into this problem. I am using Drupal 6.17:
IE8, MySQL:5.0.22, PHP:5.2.12, Apache:2.2.14. (Right, Windows OS)
I tried uncommenting the $cookie_domain and setting it to: "oa.local" which is one of my Appache domains.
And I set IE to accept cookie and recreate the database every time, but no luck, always in such issue.
Does anyone have a suggestion?
Comment #38
pyliu8621 commentedI tried redoing with my Chrome browser. First I cleaned the cookies for Chrome, and then re-created the database, re-copied the Drupal directory into Apache hotdocs, then it works. Since I am still a newbie, I will try understand what happened with this issue later. It really frustrated me for a few hours. Hope this can help some others.
Comment #39
bob_hirnlego commentedI'm having the same problem here with D6.17. Installation stops at the "Install site" step, 44 db tables installed.
Ubuntu, with MYSQL 5.1.37, PHP 5.2.10 and APACHE 2.2.12.
Using a fresh installation of Chrome (cookies enabled), fresh downloaded D6.17, a fresh database, no $cookie_domain set, everything just plain default!
Comment #40
bob_hirnlego commentedResolved (for me) but don't know why: the date of my server was in the past. Updating with ntpdate resolved.
Comment #41
pyliu8621 commentedRecently I installed the 2nd Drupal site, I was still getting into this problem. I am using Drupal 6.19:
Windows 7, E8/Firefox and a few other browsers, MySQL:5.0.22, PHP:5.2.12, Apache:2.2.14.
I tried uncommenting the $cookie_domain and setting it to: "oa.local" which is one of my Appache virtual hosts.
And I set IE to accept cookie and recreate the database every time, but no luck, always in such issue.
Only when I use chrome 5.0.375.127, it works.
So it does is related to cookie, however there are some other factors, please help or investigate. Thanks.
Comment #42
damien tournoud commentedComment #43
David_Rothstein commentedThis was previously marked duplicate, but the issue it was marked duplicate of already had a patch committed to Drupal 7.
Surely this is a duplicate of something, though :) I think #791004: Installer does not warn the user that cookies must be enabled with the correct cookie domain (and fails when they aren't) is the issue which has the most useful discussion.
Comment #44
DaiHadi commentedIt may be because of existing files, i deleted all installed files and then installed core again, also installed
sites.phpandsettings.php, this fresh installation has no problem and site is up now. I think it was because menu module tries to find menu implementations and before complete installation this may broke process of buildingmenu_routerdatabase table. so it will be empty and causes errors ...Comment #45
grendzy commentedPlease don't reset the status / title of old issues.