2

I just setup pantheon for one of my websites. So far I've done the following and the site works fine:

Version Drush: 5.3 Local Dev: Ubuntu 12.04

  1. Git clone the repo to my local desktop
  2. Copy the pantheon.aliases.php file to the .drush directory at ~/home

Now when i do a drush @pan.chouse.dev pm-list I get the following error.

~/websites/pan-chouse$ drush @pan.chouse.dev pm-list

Command pm-list needs a higher bootstrap level to run - you will need    [error]
to invoke drush from a more functional Drupal environment to run thiscommand.

The drush command 'pm-list' could not be executed.                       [error]
The directory /home/drupalpro/websites/pan-chouse does not contain a     [error]
valid Drupal installation

I also did a drush @pan.chouse.dev status and I get this:

~/websites/pan-chouse$ drush @pan.chouse.dev status PHP configuration : /srv/bindings/a59cd0c1631747ef8cda2b5e88fc5124/php.ini
/srv/bindings/a59cef8cda2b5e88fc5124/php.ini Drush version : 5.10.0
Drush : /srv/bindings/a59cd8cda2b5e88fc5124/drushrc.
configuration php

I'm not exactly sure what I'm doing wrong as it should technically work.

6
  • What does drush sa @pan.chouse.dev say? It looks like your alias is empty. Oct 8, 2014 at 15:44
  • nvm it works.. it shows this... prntscr.com/4u81at Oct 8, 2014 at 15:50
  • 1
    Do you have settings.php in place ?
    – RajeevK
    Oct 8, 2014 at 18:00
  • yea i just copied another settings.php files into the default folder... it still doesnt show any response. but when i go outside of the drupal folder.. i get a response from pantheon, but it shows that the default theme is "garland", but i have "omega" as the default theme... see here: prntscr.com/4u9yzt Oct 8, 2014 at 18:44
  • 1
    Does your alias specify a bunch of additional params? Here's one of my Pantheon aliases: $aliases['mysite.test'] = array( 'root' => '.', 'uri' => 'test.mysite.gotpantheon.com', 'remote-host' => 'appserver.test.long-id.drush.in', 'remote-user' => 'test.long-id, 'ssh-options' => '-p 2222 -o "AddressFamily inet"',
    – Webdrips
    Oct 9, 2014 at 1:42

2 Answers 2

4

While sites on Pantheon don't require a settings.php file in order to serve web requests, due to the fact that database credentials are dynamically injected, they will still need a settings.php configuration file present in order to enable the remote execution of Drush commands. With Drush 5 installed locally, there is unexpected behavior with Pantheon aliases run from inside a local Drupal docroot. In addition, the --strict=0 option needs to be appended to most commands when using Drupal 6 on your local dev environment.

Source: Drush error “Could not find a Drupal settings.php file” or missing system information from status

7
  • that didnt work.. did it outside of the drupal folder too. see here: prntscr.com/4ui78a Oct 9, 2014 at 14:30
  • It didn't work because you need a settings.php file in your /code/sites/default/ directory in order to run drush commands on Pantheon aliases. Make a copy of default.settings.php and call it settings.php and you will have great success. Oct 10, 2014 at 17:36
  • nope that didnt work, see here: prntscr.com/4uvc4c Oct 10, 2014 at 17:55
  • 1
    You need to put the settings.php file in your code directory on Pantheon. Oct 10, 2014 at 20:23
  • but wouldnt that overwrite the existing one on the pantheon servers? how would i go about doing that? Oct 10, 2014 at 20:25
3

Ok so this is how i solved it after 4 days of trying... the docs and support techs on pantheon are not clear which has lead to this confusion and im sure many others too.

To get Drush aliases to work you have to have a settings.php file in the sites/default folder. BUT! when we use pantheon, we all git clone the codebase to our local. So we all assume that we needed it in our local drupal setup that we cloned which is not the case.

You have to have the EMPTY settings.php file on the PANTHEON servers! In order to get it there, you have to switch your account to SFTP mode from GIT. I then logged in to the server via the terminal. Just copy and paste the cli command they give you on the info box.

Once you get inside, you need to goto this folder:

code/sites/default

Then I upload an empty settings.php file taken from default.settings.php.

This is what you should see once setup properly:

enter image description here

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.