cannot install drupal - menu_router error

k1tsune - July 8, 2008 - 19:32
Project:Drupal
Version:6.9
Component:install system
Category:bug report
Priority:critical
Assigned:Unassigned
Status:duplicate
Description

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?

#1

k1tsune - July 8, 2008 - 20:45

Found 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.

#2

SolaFide001 - August 6, 2008 - 21:01
Title:cannot install drupal» cannot install drupal - $cookie_domain is not the answer, but it is close!
Version:6.x-dev» 6.3

I 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.

#3

om457 - August 27, 2008 - 00:25
Version:6.3» 6.4

What 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.

#4

om457 - August 27, 2008 - 22:14
Title:cannot install drupal - $cookie_domain is not the answer, but it is close!» cannot install drupal - menu_router error

#5

ravendas - August 28, 2008 - 07:36

I 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.

#6

gurubert - August 28, 2008 - 19:39

Hi, 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

#7

om457 - August 28, 2008 - 23:20

re: 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.

#8

dannygoh - September 5, 2008 - 20:49

I 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.

#9

krf - September 17, 2008 - 12:55

Yes, 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.

#10

nevets - September 18, 2008 - 19:15

I found the error due to the install failing (did not complete) and that was due to the PHP memory limit being too low.

#11

unscarred1925 - October 3, 2008 - 17:27

I 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

#12

asteffes - October 6, 2008 - 16:35

I'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.

#13

andypost - October 6, 2008 - 19:27

A 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

#14

dropcube - October 7, 2008 - 02:30
Status:active» duplicate

this is a duplicate of #261148: Menu first rebuild does not happen

#15

andypost - October 7, 2008 - 03:29
Status:duplicate» postponed (maintainer needs more info)

This is not dup - this against 6.x branch and depends on browser!

#16

alexanderpas - October 7, 2008 - 10:01
Status:postponed (maintainer needs more info)» duplicate

It might not be an exact duplicate of #261148: Menu first rebuild does not happen, however the source of this bug is exactly the same as #307937: MYSQL Syntax error on installation with pre-filled tables (and #261148: Menu first rebuild does not happen), 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.

#17

reaneyk - October 9, 2008 - 16:06

I'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.

#18

robbt - October 10, 2008 - 23:27

Wow, 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

#19

robbt - October 10, 2008 - 23:37

I 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.

#20

grendzy - October 31, 2008 - 00:19
Version:6.4» 6.6
Status:duplicate» active

This bug is still occurring for me on Drupal 6.6 (which has the patch from #261148: Menu first rebuild does not happen 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.

#21

alexanderpas - October 31, 2008 - 10:08
Status:active» postponed (maintainer needs more info)

could 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...

#22

grendzy - October 31, 2008 - 16:00
Status:postponed (maintainer needs more info)» duplicate

alexanderpas, 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!

#23

CeramicWeasel - December 6, 2008 - 04:08

The 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.

#24

Frank Steiner - December 11, 2008 - 08:45

I 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.

#25

nikitas - December 30, 2008 - 15:52

Hi 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.

#26

vaobeheer - January 3, 2009 - 20:09

We 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.

#28

cmayberry - February 25, 2009 - 16:40

I 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:

Warning: Unknown column 'serialized' in 'field list' query: SELECT data, created, headers, expire, serialized FROM cache WHERE cid = 'variables' in /export/home/users/wwwadmin/www-test/includes/database.mysql.inc on line 128

Warning: Unknown column 'serialized' in 'field list' query: UPDATE cache SET data = 'a:311:{s:13:\"theme_default\";s:9:\"andreas01\";s:13:\"filter_html_1\";i:1;s:18:\"node_options_forum\";a:1:{i:0;s:6:\"status\";}s:17:\"menu_primary_menu\";i:2;s:19:\"menu_secondary_menu\";i:2;s:15:\"install_profile\";s:7:\"default\";s:17:\"node_options_page\";a:1:{i:0;s:6:\"status\";}s:12:\"comment_page\";i:0;s:18:\"drupal_private_key\";s:64:\"fd0681f680a29248675065152298c8ed245aff8456f6d8522531217efd6dc0c0\";s:19:\"file_directory_temp\";s:4:\"/tmp\";s:13:\"image_updated\";i:1186074908;s:18:\"image_default_path\";s:6:\"images\";s:21:\"image_max_upload_size\";s:3:\"800\";s:11:\"image_sizes\";a:3:{s:9:\"_original\";a:5:{s:5:\"label\";s:8:\"Original\";s:5:\"width in /export/home/users/wwwadmin/www-test/includes/database.mysql.inc on line 128

Warning: Cannot modify header information - headers already sent by (output started at /export/home/users/wwwadmin/www-test/includes/database.mysql.inc:128) in /export/home/users/wwwadmin/www-test/includes/bootstrap.inc on line 620

Warning: Cannot modify header information - headers already sent by (output started at /export/home/users/wwwadmin/www-test/includes/database.mysql.inc:128) in /export/home/users/wwwadmin/www-test/includes/bootstrap.inc on line 621

Warning: Cannot modify header information - headers already sent by (output started at /export/home/users/wwwadmin/www-test/includes/database.mysql.inc:128) in /export/home/users/wwwadmin/www-test/includes/bootstrap.inc on line 622

Warning: Cannot modify header information - headers already sent by (output started at /export/home/users/wwwadmin/www-test/includes/database.mysql.inc:128) in /export/home/users/wwwadmin/www-test/includes/bootstrap.inc on line 623

Warning: Unknown column 'language' in 'where clause' query: SELECT src FROM url_alias WHERE dst = 'upgrade' AND language IN('en', '') ORDER BY language DESC in /export/home/users/wwwadmin/www-test/includes/database.mysql.inc on line 128

Site off-line

warning: Cannot modify header information - headers already sent by (output started at /export/home/users/wwwadmin/www-test/includes/database.mysql.inc:128) in /export/home/users/wwwadmin/www-test/includes/common.inc on line 141.
warning: Invalid argument supplied for foreach() in /export/home/users/wwwadmin/www-test/includes/theme.inc on line 463.
warning: Invalid argument supplied for foreach() in /export/home/users/wwwadmin/www-test/includes/theme.inc on line 468.
warning: Invalid argument supplied for foreach() in /export/home/users/wwwadmin/www-test/includes/theme.inc on line 463.
warning: Invalid argument supplied for foreach() in /export/home/users/wwwadmin/www-test/includes/theme.inc on line 468.
warning: Invalid argument supplied for foreach() in /export/home/users/wwwadmin/www-test/includes/theme.inc on line 463.
warning: Invalid argument supplied for foreach() in /export/home/users/wwwadmin/www-test/includes/theme.inc on line 468.
warning: Invalid argument supplied for foreach() in /export/home/users/wwwadmin/www-test/includes/theme.inc on line 463.
warning: Invalid argument supplied for foreach() in /export/home/users/wwwadmin/www-test/includes/theme.inc on line 468.
warning: Cannot modify header information - headers already sent by (output started at /export/home/users/wwwadmin/www-test/includes/database.mysql.inc:128) in /export/home/users/wwwadmin/www-test/includes/common.inc on line 141.
user warning: Unknown column 'language' in 'where clause' query: SELECT src FROM url_alias WHERE dst = 'node' AND language IN('en', '') ORDER BY language DESC in /export/home/users/wwwadmin/www-test/includes/path.inc on line 80.
We're working on updates for the site. Please check out the updates later.

Please help

#29

djflux - March 3, 2009 - 13:39
Version:6.6» 6.9

I 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:

php_flag session.cookie_secure on

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.

#30

XP-Internet.com - March 12, 2009 - 15:08

I 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.

#31

viz8 - March 20, 2009 - 00:27

I'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

#32

binford2k - April 11, 2009 - 20:21

heh. My problem here was forgetting to enable cookies in my browser. Go me.

 
 

Drupal is a registered trademark of Dries Buytaert.