while installing Drupal 6.1 on WAMP 5 ( php5, MySQL5, Apache2 on WInXP)
this is what I got on "Install site" stage of installation of brand new Drupal 6.1 on WAMP5:
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:\www\6\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
D:\www\6\includes\menu.inc on line 315.
what could it BE!? can you fix this..?
Comments
Comment #1
TravieMo9 commentedI also had the problem while updating. When I got finished updating I had no menu and had these warnings in red:
warning: array_map() [function.array-map]: Argument #2 should be an array in C:\www\webapps\drupal\modules\system\system.module on line 958.
warning: array_keys() [function.array-keys]: The first argument should be an array in C:\www\webapps\drupal\includes\theme.inc on line 1712.
warning: Invalid argument supplied for foreach() in C:\www\webapps\drupal\includes\theme.inc on line 1712.
Windows XP Sp2
Web Developer Server Suite
php 5.2
Comment #2
beginner commentedSame here at dreamhost, on php5, mysql5, upon install. I just can't install the site!
Comment #3
beginner commentedComment #4
beginner commentedHere is the cause: cookies must be accepted for the new domain where we install drupal.
With cookies on, everything runs smoothly.
The problem is that it's very easy to add a new domain on a whitelist, and the error given does not suggests it's a cookie problem but points to a SQL problem, which is very misleading.
See:
#2946: Login fails and no warning is issued if cookies are not enabled
#261148: menu_masks variable is empty (race condition)
#280015: cannot install drupal - menu_router error
Comment #5
kcolwell commentedI was having this same problem doing a clean install of drupal 6.10 and was able to resolve this issue by checking the session.cookie_domain in php.ini. If you are using MAMP with localhost or 127.0.0.1 as the address the session.cookie_domain in php.ini must match so that you get drupal session cookie. Otherwise you just keep getting the sql warning.
Comment #6
blup commentedI'm having this same problem, and I'm doing the upgrade on IE (as some have suggested vs Firefox), i erased all cookies, and they are enabled. I was wondering about kcolwell's post on specifying the session.cookie_domain. I'm a bit new to this, so I'm not sure which IP i'm supposed to specify in php.ini, but i'd like to find out to see if this solution works for me. Thanks!
Comment #7
kenorb commentedThe same problem on 7.x: #313606: menu_router error during install
Comment #8
kenorb commentedHere is a backtrace of the problem:
Basically menu_get_ancestors() is returning empty array of $placeholders here:
And MySQL query goes wrong.
In my case it happen when menu_get_ancestors() gets array (0 => 'node') as argument.
I've reproduced it on already installed Drupal.
Comment #9
zcr0nk commentedI"m still getting this error, "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.."
I tried placing a blank $placeholders variable and even entering dummy values for the $placeholders array. This gets me past the sql error but then I get a blank page with "Home" on the upper left corner.
I've tried different browsers and cookies settings in the browser.
tried emptying out the db tables, still nothing.
I have reverted back to 6.2, no problems. working like a charm.
Any other ideas on how to solve this?
Comment #10
Tally commentedI got this error repeatedly installing 6.13 on a hosted server. I tried both IE7 and FF. I went into phpMyAdmin and dropped all the tables in the database. It worked when I re-ran the install.php.
Comment #11
damien tournoud commentedThis pretty much always means that you don't have cookies enabled, or that your cookie setup is wrong (look at the $cookie_domain param from settings.php).
Comment #12
kojiroh commentedI also encounter the same problem. I am using 3 boxes configuration (reverse proxy server, application server and database server).
$cookie_domain in settings.php is empty when the fresh installation of Drupal is being performed.
I have tried to set this variable with my domain name but I still get the same error message.
Please help.
Comment #13
damien tournoud commentedThis is a duplicate of #313606: menu_router error during install.
Comment #14
roball commentedI am also encountering this problem with D6.15 with FF. Of course I have enabled cookies and JS.
Since this issue has first been reported on 2008-03-15, I don't think it's correct to mark this as duplicate of #313606: menu_router error during install which has been reported 6 months later (on 2008-09-25). IMO, this is a critical bug.
Comment #15
roball commentedI could now fix this problem by setting PHP's session.cookie_secure to off. Previously, it had been set to on because all the other Drupal instances on that multisite installation are only accessible via HTTPS, but th new site does not yet have an SSL host set up.
Nevertheless, I still consider this problem as a Drupal bug because the error message should not be that strange and at least point to the real (cookie related) problem.
Comment #16
damien tournoud commentedYou should have read the duplicate issue first. That would have saved you some trouble.