I want to install drupal7 using drush commands, from the following location:
d:/wamp/www/drupal

1. download drupal project
drush dl drupal
2 make the database
mysqladmin –u mytest –p create mytest
pass: mytest
3. execute the drush site installation script:
drush si --db-url=mysql://mytest:mytest@localhost:8080/mytest
username=mytest; pass=mytest; dbname=mytest

I get the error: The system cannot find the path specified.

I don't know how to install drupal7, using the specified DB params - specific for drupal 6
--db-url=mysql://root:pass@localhost:port/dbname

In settings.php the db is defined different:
drupal6: "db_url"
drupal7: "array".

drush si - creates settings.php file (db is defined as "array"), but cannot write db in this file, using "db_url"

I am very confused, because the db was set correctly and the wamp server worked fine.
I don't understand why I get the error: "The system cannot find the path specified."
I attached the errors screen.

Please help.
Thks

Comments

greg.1.anderson’s picture

Status: Active » Postponed (maintainer needs more info)
Issue tags: +Windows

Does drush work on your system on Drupal sites that are already installed? Did you use the Drush Windows installer to install drush?

This could be a Windows bug; I don't know if drush si works on Windows or not.

iancu35’s picture

Hi,

- drush works fine with other drupal sites installed on my local wamp server
- I use all-versions-5.x-dev for drush - installed by copy-paste
- drupal installation through browser also worked great

until now I installed drupal through browser or drush make - it was ok

maybe the problem appears because I have already installed other drupal sites (with different versions of drupal 7) on my wamp server:
'' 'db-url' => 'A Drupal 5/6 style database URL. Only required for initial install - not re-install." - help quote

thks again

iancu35’s picture

SQLite db is the easist way to use drush site-install on D7, because it builds the SQLite DB by itself.

ex: I have installed drupal on localhost: H:\xampp\htdocs\mysite

H:\xampp\htdocs\mysite>drush si mysite --db-url=sqlite://sites/default/files/mysite.ht.sqlite
--account-name=mysite --account-pass=mysite --site-name=mysites

You are about to create a sites/default/settings.php file and CREATE the 'sites/default/files/mysite.ht.sqlite' database.
Do you want to continue? (y/n): y

Starting Drupal installation. This takes a few seconds ... [ok]

Installation complete. User name: mysite User password: mysite [ok]

Voila. Drush knows where to find db parameters and then write them in the newly created settings.php for d7.

$databases = array (
'default' =>
array (
'default' =>
array (
'database' => 'sites/default/files/mysite.ht.sqlite',
'driver' => 'sqlite',
'prefix' => '',
),

greg.1.anderson’s picture

@iancu35: Did you install sqlite on Windows? What libraries did you install, and where did you put them? I'm not very Windows-aware, and had trouble with the dependencies last time I tried to test sqlite with Drush on Windows. If we know the list of components and where they go, we can probably add sqlite to the Drush Windows installer.

iancu35’s picture

StatusFileSize
new4.79 KB
new683 bytes

A. sqlite_db

I attached the drush status of a drupal-7.8 installation on my local wamp server, to see info: version & path

- drupal site resides in: D:\wamp\www\drog

I 've done nothing except, enabling ;extension=php_pdo_sqlite.dll in php.ini file

- sqlite-extension (dll) resides in: D:\wamp\bin\php\php5.3.4\ext

- sqlite-database (db) resides in: D:\wamp\www\drog\includes\database\sqlite - is preinstalled beside mysql & pgsql

I hope it helps.

PS: I didn't try sqlite_db, using Drush Windows Installer.
================================================

B. mysql_db

"db_url path": error msg: The system cannot find the path specified. => You are about to CREATE the 'mytest' database.

- drush tries to create a new db (even an empty db is already created, and user with all privileges), because it didn't find the path... even if I use the default user for mysqladmin: --db-url=mysql://root@localhost:8080/dbname
- tcp/ip port:8080 & mysql port:3306

I attached the modification made in my.ini file:
- used my-huge.ini instead of default my.ini (copy and rename it)
- max_allowed_packet = 100M in [mysqld] & [mysqldump]

But still no success
===========================================
thks for your efforts

beltofte’s picture

Assigned: Unassigned » beltofte
Status: Postponed (maintainer needs more info) » Active

I can confirm that this also fails on my VM with Windows Server 2008 R2. I narrowed it down to the code where Drush checks if the MySQL db exists or not. This command "mysql --database=drupal_79_2 --host=127.0.0.1 --user=root --password=root -e "SELECT 1;" 2> /dev/null > /dev/null" fails on Windows to to the tmp folders. Tried changing them to use getenv('TMP') - the users tmp folder, but that gives a permission error.

Working on a fix for that permission error......

beltofte’s picture

beltofte’s picture

Component: Documentation » Core Commands
Category: support » bug
beltofte’s picture

Status: Active » Needs review
StatusFileSize
new1.27 KB

Attached a patch to fix the /dev/null issue on Windows. On Windows is it possible to use "nul" instead of /dev/null. It does not work when executed directly in PowerShell though, but works fine when executed through exec().

site-install continue to fail after this fix in my local environment with cache_get() not defined.... I will create another issue about that error.

beltofte’s picture

The undefined cache_get() error is gone after upgrade to Drupal 7.10. "drush si" now works fine on my Windows Server 2008 R2 :-)

moshe weitzman’s picture

Status: Needs review » Needs work

We actually have drush_has_bash() for this sort of test. Otherwise, looks good. Please reroll if possible.

moshe weitzman’s picture

Issue tags: +Release blocker

Add tag

beltofte’s picture

Will fix it Monday.

greg.1.anderson’s picture

I somehow thought that there would be a lot of /dev/null references in drush, but the only other ones that exist are in drush_start_browser in includes/exec.inc, and in the make generate command in Drush make.

beltofte’s picture

StatusFileSize
new2.16 KB

The attached patch fixes the following:

- Same as in #9.
- Using drush_has_bash() in drush_bit_bucket().
- Fixing hard coded bit bucket in drush_start_browser().
- Falling back to the command "start" in drush_start_browser() if the client does not have bash, the function now also works on Windows :-)

beltofte’s picture

Updated patch to contain bit bucket fix for _drush_generate_custom_project() in Drush make.

moshe weitzman’s picture

I think you missed a ! symbol at "- Falling back to the command `start` in drush_start_browser() if the client does not have bash"

beltofte’s picture

Damm... you are right. 2 secs and you have a new patch.

beltofte’s picture

Adding ! in drush_browser_start().

moshe weitzman’s picture

Status: Needs work » Fixed

Removed trailing whitespace in 1 line and then committed. Thanks.

Automatically closed -- issue fixed for 2 weeks with no activity.