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
| Comment | File | Size | Author |
|---|---|---|---|
| #19 | windows_bit_bucket_and_browser_start_and_drush_make.patch | 2.86 KB | beltofte |
| #16 | windows_bit_bucket_and_browser_start_and_drush_make.patch | 2.86 KB | beltofte |
| #15 | windows_bit_bucket_and_browser_start.patch | 2.16 KB | beltofte |
| #9 | mysql_bit_bucket.patch | 1.27 KB | beltofte |
| #5 | drush status.txt | 683 bytes | iancu35 |
Comments
Comment #1
greg.1.anderson commentedDoes 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.
Comment #2
iancu35 commentedHi,
- 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
Comment #3
iancu35 commentedSQLite 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' => '',
),
Comment #4
greg.1.anderson commented@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.
Comment #5
iancu35 commentedA. 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
Comment #6
beltofteI 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......
Comment #7
beltofteMarked #1386272: Windows site-install - The system cannot find the path specified. as duplicate of this issue.
Comment #8
beltofteComment #9
beltofteAttached 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.
Comment #10
beltofteThe undefined cache_get() error is gone after upgrade to Drupal 7.10. "drush si" now works fine on my Windows Server 2008 R2 :-)
Comment #11
moshe weitzman commentedWe actually have drush_has_bash() for this sort of test. Otherwise, looks good. Please reroll if possible.
Comment #12
moshe weitzman commentedAdd tag
Comment #13
beltofteWill fix it Monday.
Comment #14
greg.1.anderson commentedI 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.
Comment #15
beltofteThe 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 :-)
Comment #16
beltofteUpdated patch to contain bit bucket fix for _drush_generate_custom_project() in Drush make.
Comment #17
moshe weitzman commentedI think you missed a ! symbol at "- Falling back to the command `start` in drush_start_browser() if the client does not have bash"
Comment #18
beltofteDamm... you are right. 2 secs and you have a new patch.
Comment #19
beltofteAdding ! in drush_browser_start().
Comment #20
moshe weitzman commentedRemoved trailing whitespace in 1 line and then committed. Thanks.