Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot do site-install #76

Closed
kartagis opened this issue Sep 11, 2013 · 13 comments
Closed

Cannot do site-install #76

kartagis opened this issue Sep 11, 2013 · 13 comments

Comments

@kartagis
Copy link
Contributor

Hi,

I was trying to re-install my drupal 8 testbed and I thought I'd give Drush a whirl with this. What I did was drush8 -y si standard --db-url=mysql://d8testbeduser:d8testbedpass@localhost/d8testbed --account-name=dev --account-mail=me@example.com --account-pass=pass

and I got

You are about to DROP all tables in your 'd8testbed' database. Do you want to continue? (y/n): y
PHP Fatal error: Uncaught exception 'Exception' with message 'The configuration directory type active does not exist.' in /var/www/drupal-8/core/includes/bootstrap.inc:491
Stack trace:

#0 /usr/local/bin/drush8/commands/core/site_install.drush.inc(146): config_get_config_directory()
#1 [internal function]: drush_core_pre_site_install('standard')
#2 /usr/local/bin/drush8/includes/command.inc(332): call_user_func_array('drush_core_pre_...', Array)
#3 /usr/local/bin/drush8/includes/command.inc(198): _drush_invoke_hooks('site-install', Array, 'core')
#4 [internal function]: drush_command('standard')
#5 /usr/local/bin/drush8/includes/command.inc(165): call_user_func_array('drush_command', Array)
#6 /usr/local/bin/drush8/drush.php(92): drush_dispatch(Array)
#7 /usr/local/bin/drush8/drush.php(61): _drush_bootstrap_and_dispatch()
#8 /usr/local/bin/drush8/drush.php(16): drush_main()
#9 {main}
  thrown in /var/www/drupal-8/core/includes/bootstrap.inc on line 491
Drush command terminated abnormally due to an unrecoverable error.                                                                [error]
Error: Uncaught exception 'Exception' with message 'The configuration directory type <em class="placeholder">active</em> does not
exist.' in /var/www/drupal-8/core/includes/bootstrap.inc:491
Stack trace:
#0 /usr/local/bin/drush8/commands/core/site_install.drush.inc(146): config_get_config_directory()
#1 [internal function]: drush_core_pre_site_install('standard')
#2 /usr/local/bin/drush8/includes/command.inc(332): call_user_func_array('drush_core_pre_...', Array)
#3 /usr/local/bin/drush8/includes/command.inc(198): _drush_invoke_hooks('site-install', Array, 'core')
#4 [internal function]: drush_command('standard')
#5 /usr/local/bin/drush8/includes/command.inc(165): call_user_func_array('drush_command', Array)
#6 /usr/local/bin/drush8/drush.php(92): drush_dispatch(Array)
#7 /usr/local/bin/drush8/drush.php(61): _drush_bootstrap_and_dispatch()
#8 /usr/local/bin/drush8/drush.php(16): drush_main()
#9 {main}
  thrown in /var/www/drupal-8/core/includes/bootstrap.inc, line 49
My debug is

Bootstrap to phase 0. [0.01 sec, 3.49 MB]                            [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drush() [0.01 sec, 3.68 MB] [bootstrap]
Cache HIT cid: 6.0-dev-commandfiles-0-fdcf5299481b228c23bf580d194f92c8 [0.02 sec, 3.7 MB]                                             [debug]
Bootstrap to phase 0. [0.05 sec, 8.5 MB]                                                                                          [bootstrap]
Bootstrap to phase 1. [0.06 sec, 8.51 MB]                                                                                         [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_root() [0.06 sec, 8.51 MB]                                                        [bootstrap]
Initialized Drupal 8.0-dev root directory at /var/www/drupal-8 [0.08 sec, 10.18 MB]                                                  [notice]
Found command: site-install (commandfile=core) [0.08 sec, 10.17 MB]                                                               [bootstrap]
Executing: mysql --database=d8testbed --host=localhost --user=d8testbeduser --password=d8testbedpass -e "SELECT 1;" 2> /dev/null > /dev/null
You are about to DROP all tables in your 'd8testbed' database. Do you want to continue? (y/n): y
Sites directory sites/default already exists - proceeding. [0.12 sec, 10.22 MB]                                                      [notice]
Executing: mysql --database=d8testbed --host=localhost --user=d8testbeduser --password=d8testbedpass -e "SELECT 1;" 2> /dev/null > /dev/null
Executing: mysql --database=d8testbed --host=localhost --user=d8testbeduser --password=d8testbedpass  < /tmp/drush_d5i0oa
No tables to drop. [0.15 sec, 10.25 MB]                                                                                           [ok]
PHP Fatal error:  Uncaught exception 'Exception' with message 'The configuration directory type <em class="placeholder">active</em> does not exist.' in /var/www/drupal-8/core/includes/bootstrap.inc:491
Stack trace:
#0 /usr/local/bin/drush8/commands/core/site_install.drush.inc(146): config_get_config_directory()
#1 [internal function]: drush_core_pre_site_install('standard')
#2 /usr/local/bin/drush8/includes/command.inc(332): call_user_func_array('drush_core_pre_...', Array)
#3 /usr/local/bin/drush8/includes/command.inc(198): _drush_invoke_hooks('site-install', Array, 'core')
#4 [internal function]: drush_command('standard')
#5 /usr/local/bin/drush8/includes/command.inc(165): call_user_func_array('drush_command', Array)
#6 /usr/local/bin/drush8/drush.php(92): drush_dispatch(Array)
#7 /usr/local/bin/drush8/drush.php(61): _drush_bootstrap_and_dispatch()
#8 /usr/local/bin/drush8/drush.php(16): drush_main()
#9 {main}
  thrown in /var/www/drupal-8/core/includes/bootstrap.inc on line 491
Drush command terminated abnormally due to an unrecoverable error.                                                                [error]
Error: Uncaught exception 'Exception' with message 'The configuration directory type <em class="placeholder">active</em> does not
exist.' in /var/www/drupal-8/core/includes/bootstrap.inc:491
Stack trace:
#0 /usr/local/bin/drush8/commands/core/site_install.drush.inc(146): config_get_config_directory()
#1 [internal function]: drush_core_pre_site_install('standard')
#2 /usr/local/bin/drush8/includes/command.inc(332): call_user_func_array('drush_core_pre_...', Array)
#3 /usr/local/bin/drush8/includes/command.inc(198): _drush_invoke_hooks('site-install', Array, 'core')
#4 [internal function]: drush_command('standard')
#5 /usr/local/bin/drush8/includes/command.inc(165): call_user_func_array('drush_command', Array)
#6 /usr/local/bin/drush8/drush.php(92): drush_dispatch(Array)
#7 /usr/local/bin/drush8/drush.php(61): _drush_bootstrap_and_dispatch()
#8 /usr/local/bin/drush8/drush.php(16): drush_main()
#9 {main}
  thrown in /var/www/drupal-8/core/includes/bootstrap.inc, line 491 [0.15 sec, 10.21 MB]
My status is

Drupal version                  :  8.0-dev                                                                        
 Site URI                        :  http://www                                                                     
 Database driver                 :  mysql                                                                          
 Database hostname               :  localhost                                                                      
 Database username               :  d8testbeduser                                                                  
 Database name                   :  d8testbed                                                                      
 Database                        :  Connected                                                                      
 Drupal bootstrap                :  Successful                                                                     
 Drupal user                     :  Anonymous                                                                      
 Default theme                   :  garland                                                                        
 Administration theme            :  garland                                                                        
 PHP configuration               :  /etc/php.ini                                                                   
 Drush version                   :  6.0-dev                                                                        
 Drush configuration             :                                                                                 
 Drupal root                     :  /var/www/drupal-8                                                              
 Site path                       :  sites/default                                                                  
 Active config directory path    :  sites/default/files/config_FWzmnYhZUNJTDS0qU8aLiw4nQVlrrW8g_517bGd51UU/active  
 Staging config directory path   :  sites/default/files/config_FWzmnYhZUNJTDS0qU8aLiw4nQVlrrW8g_517bGd51UU/staging 
 File directory path             :  sites/default/files                                                            
 Temporary file directory path   :  /tmp
Regards,
@greg-1-anderson
Copy link
Member

The original issue was: https://drupal.org/node/1961648

Have you tried to reproduce this with the latest code in the master branch? I think site-install works with D8 now.

@kartagis
Copy link
Contributor Author

Yeah, I tried a minute ago, and I got

PHP Fatal error: Unsupported operand types in /usr/local/bin/drush8/includes/sitealias.inc on line 1517

PS: Did I clone the right thing? I did git clone https://github.com/drush-ops/drush drush8

@greg-1-anderson
Copy link
Member

Just make sure that you're using the master branch (git checkout master); if you weren't, though, then you should receive an error that Drupal 8 is not supported, so seems you've probably got the right branch.

@greg-1-anderson
Copy link
Member

I just ran a drush site-install followed by a drush status, and both commands worked fine. I didn't do any further testing than this, though.

@kartagis
Copy link
Contributor Author

Hi,

I issued the command time drush8 si standard --account-mail=bilgi@webciniz.im --account-name=dev --db-su=root --db-su-pw=drakkar --db-url=mysql://d8testbeduser@d8testbedpass:localhost/d8testbed --site-name="dev env" and again I got
PHP Fatal error: Unsupported operand types in /usr/local/bin/drush8/includes/sitealias.inc on line 1517

This is my .git/config (did I get the right thing?)

cat .git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
fetch = +refs/heads/:refs/remotes/origin/
url = https://github.com/drush-ops/drush
[branch "master"]
remote = origin
merge = refs/heads/maste

@patcon
Copy link

patcon commented Sep 19, 2013

Drush version : 6.0-dev

From your initial output, it looks like you're on 6.x branch. Here's what I have on master:

➜  composer-yaml-parser git:(master) ✗ drush --version
Drush Version   :  7.0-dev

I think this is safe to close? If you have another issue on the correct branch, then I imagine it would make more sense to open another :)

Cheers!

EDIT: It's always good to start off a bug report with a sanity check like this -- for both you and the person trying to help you out:

drush --version
git log --oneline --n1 # print log of recent commit

@kartagis
Copy link
Contributor Author

drush8 --version
Drush Version : 7.0-dev
git log --oneline -n1
f3bba6e Merge pull request #90 from jeff-h/patch-1

@greg-1-anderson
Copy link
Member

I'm going to close as a duplicate of #123.

@patcon
Copy link

patcon commented Sep 19, 2013

It seems that the other dup lacked errors. I also see that your error involves includes/sitealias.inc.

To try to distinguish a little better @kartagis, perhaps you could temporarily remove your aliases (or rename the whole ~/.drush folder) to try to narrow down the error. If it goes away without your aliases, then that's incredibly useful.

@kartagis
Copy link
Contributor Author

I don't use aliases for this particular folder.

@kartagis
Copy link
Contributor Author

@patcon @greg-1-anderson I see that this issue references to a few issues, such as #123 but I highly doubt that's even similar, as I'm not on PHP 5.5.

@John-B
Copy link

John-B commented Oct 20, 2013

This happens if the --db-url is malformed:
--db-url=mysql://user:password@localhost:dbname WRONG
--db-url=mysql://user:password@localhost/dbname RIGHT
or localhost:port. The documentation could be clearer.

@kartagis
Copy link
Contributor Author

I was (wrongly) doing user@password:localhost/dbname instead of user:password@localhost/dbname. I found that out a bit late. Thanks though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants