I've got a fresh D6.20 core ready for installation and when I run the command drush site-install --db-url=mysql://beta:beta@localhost/beta Drupal fails to fully install. Examining the debug output I get the errors:

 <li>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 &#039;) ORDER BY fit DESC LIMIT 0, 1&#039; at line 1
  query: SELECT * FROM menu_router WHERE path IN () ORDER BY fit DESC LIMIT 0, 1 in /var/www/vhosts/test.com/beta/includes/menu.inc on line 315.</li>
    <li>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 &#039;) ORDER BY fit DESC LIMIT 0, 1&#039; at line 1
  query: SELECT * FROM menu_router WHERE path IN () ORDER BY fit DESC LIMIT 0, 1 in /var/www/vhosts/test.com/beta/includes/menu.inc on line 315.</li>

and

 <li>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 &#039;) ORDER BY fit DESC LIMIT 0, 1&#039; at line 1
  query: SELECT * FROM menu_router WHERE path IN () ORDER BY fit DESC LIMIT 0, 1 in /var/www/vhosts/test.com/beta/includes/menu.inc on line 315.</li>
    <li>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 &#039;) ORDER BY fit DESC LIMIT 0, 1&#039; at line 1
  query: SELECT * FROM menu_router WHERE path IN () ORDER BY fit DESC LIMIT 0, 1 in /var/www/vhosts/test.com/beta/includes/menu.inc on line 315.</li>
   </ul>

Drush status output is as follows:

Drush was attempting to connect to : 
  Drupal version    : 6.20
  Site URI          : http://default
  Database driver   : mysql
  Database hostname : localhost
  Database username : beta
  Database name     : beta
  Database          : Connected
  Default theme     : garland
  Administration theme: garland
  PHP configuration : /etc/php5/cli/php.ini
  Drush version     : 4.0-dev
  Drush configuration: 
  Drush alias files : 
  Drupal root       : /var/www/vhosts/test.com/beta
  Site path         : sites/default
  Modules path      : sites/all/modules
  Themes path       : sites/all/themes
  File directory path: sites/default/files
  %paths            : Array

Comments

moshe weitzman’s picture

Status: Active » Postponed (maintainer needs more info)

I can't reproduce this.

peter feddo’s picture

I couldn't reproduce on another box using identical Drush/Drupal configurations. I suspect it must be a php configuration issue that doesn't play well with Drush for D6 site-install. In the debug output I get the following message after ---Flush Privileges-- and before the html error output:

Executing: php -r 'error_reporting(E_ERROR);$_GET=array("profile"=>"default", "locale"=>"en", "id"=>"1"); $_REQUEST=&$_GET;define("DRUSH_SITE_INSTALL6", TRUE);$_SERVER["SERVER_SOFTWARE"] = NULL;$_SERVER["SCRIPT_NAME"] = "/install.php";$_SERVER["HTTP_HOST"] = "default";$_SERVER["REMOTE_ADDR"] = "127.0.0.1";function _cli_cookie_print(){print(serialize(array(session_name()=>session_id())));}
register_shutdown_function("_cli_cookie_print"); include("/var/www/vhosts/peterfeddo.com/beta/max/install.php");'
Executing: php -r '$_GET=array("profile"=>"default", "locale"=>"en", "id"=>"1"); $_REQUEST=&$_GET;define("DRUSH_SITE_INSTALL6", TRUE);$_SERVER["SERVER_SOFTWARE"] = NULL;$_SERVER["SCRIPT_NAME"] = "/install.php";$_SERVER["HTTP_HOST"] = "default";$_SERVER["REMOTE_ADDR"] = "127.0.0.1";function _cli_cookie_print(){print(serialize(array(session_name()=>session_id())));}
register_shutdown_function("_cli_cookie_print"); $_GET["op"]="start"; include("/var/www/vhosts/peterfeddo.com/beta/max/install.php");'
 

Is it possible that php is giving drush bad cookie data and then that's getting sent to the menu_router configuration, thus throwing the errors?

yogaman’s picture

This error message appeared when I used the distributed install.php on an up-to-date Windows 7 laptop running wampserver 2.1d (64-bit) which comes with Apache 2.2.17 MySQL 5.1.53 PHP 5.3.4. Sadly, switching to PHP 5.2.11 causes an error message:
"Aestan Tray Menu
Could not execute menu item (internal error) [Exception] Could not perform service action: The service has not been started."

Then I read at http://drupal.org/requirements under PHP:
"PHP 5.3 is not yet supported by Drupal 5.x, but is supported by Drupal 6.14 core and higher (see the release notes for 6.14) and also by Drupal 7.x." So that was probably a wild goose chase anyway.

I got frustrated, uninstalled wampserver 2.1d 64-bit, and installed wampserver 2.1e 32-bit. During the install process, I noticed an error message that settings.php (in drupal's sites/default) must be writable by [sorry, I forget who the message said must be able to write it]. When I checked the file's properties, the only group which was not enabled for Writing was "Users ([my_computer_name]/Users)", so I enabled them to write it, too.

At this point the installation ran flawlessly, and drupal 6.20 seems to be running.

To the maintainer: I apologize for changing more than one thing at once; I know it doesn't help debug the core problem. But my objective is to build a site, so I'll leave it to you to explain what precisely went wrong.

univate’s picture

I'm getting...

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 &#039;) ORDER BY fit DESC LIMIT 0, 1&#039; at line 1
  query: SELECT * FROM menu_router WHERE path IN () ORDER BY fit DESC LIMIT 0, 1 in /var/www/vhosts/test.com/beta/includes/menu.inc on line 315.</li>

I found disabling one of my features removed the problem. The feature only really had a view, which included a menu item in the primary menu, need to do some further testing to try and work out whats happening.

greg.1.anderson’s picture

Version: » 8.x-6.x-dev
Status: Postponed (maintainer needs more info) » Closed (won't fix)
Issue tags: +Needs migration

This issue was marked closed (won't fix) because Drush has moved to Github.

If desired, you may copy this bug to our Github project and then post a link here to the new issue. Please also change the status of this issue to closed (duplicate).

Please ask support questions on Drupal Answers.