1

I get the following error when I try to run the "drush fst foundation-subtheme" command.

sh-3.2# drush fst foundation-subtheme
The drush command 'fst foundation-subtheme' could not be found.  Run `drush cache-clear drush`  [error]
to clear the commandfile cache if you have installed new extensions.
Drush was not able to start (bootstrap) the Drupal database.                                    [error]
Hint: This may occur when Drush is trying to:
 * bootstrap a site that has not been installed or does not have a configured database. In this
case you can select another site with a working database setup by specifying the URI to use with
the --uri parameter on the command line. See `drush topic docs-aliases` for details.
 * connect the database through a socket. The socket file may be wrong or the php-cli may have
no access to it in a jailed shell. See http://drupal.org/node/1428638 for details.

Drush was attempting to connect to:

Drupal version : 7.32
Site URI : http://default

Database driver : mysql
Database hostname : localhost
Database port : 3306
Database username : root
Database name : drupal
PHP executable : /usr/bin/php
PHP configuration :
PHP OS : Darwin
Drush script : /Users/Marianna/.composer/vendor/drush/drush/drush.php Drush version : 8.1.3 Drush temp directory : /tmp
Drush configuration :
Drush alias files :
Drupal root : /Users/Marianna/Documents/Sites/Link-New
Drupal Settings File : sites/default/settings.php
Site path : sites/default

I get the following error when I try to install foundation with drush:

sh-3.2# drush --uri=http://linkengineering en zurb_foundation
Command pm-enable needs a higher bootstrap level to run - you will need to invoke drush from a  [error]
more functional Drupal environment to run this command.
The drush command 'en zurb_foundation' could not be executed.                                   [error]
Drush was not able to start (bootstrap) the Drupal database.                                    [error]
Hint: This may occur when Drush is trying to:
 * bootstrap a site that has not been installed or does not have a configured database. In this
case you can select another site with a working database setup by specifying the URI to use with
the --uri parameter on the command line. See `drush topic docs-aliases` for details.
 * connect the database through a socket. The socket file may be wrong or the php-cli may have
no access to it in a jailed shell. See http://drupal.org/node/1428638 for details.

Drush was attempting to connect to:

Drupal version : 7.32
Site URI : http://linkengineering
Database driver : mysql
Database hostname : localhost
Database port : 3306
Database username : root
Database name : drupal
PHP executable : /usr/bin/php
PHP configuration :
PHP OS : Darwin
Drush script : /Users/Marianna/.composer/vendor/drush/drush/drush.php Drush version : 8.1.3 Drush temp directory : /tmp
Drush configuration :
Drush alias files :
Drupal root : /Users/Marianna/Documents/Sites/Link-New
Drupal Settings File : sites/default/settings.php
Site path : sites/default

10
  • Per the instructions, you successfully ran drush en zurb_foundation; drush cc all prior to running the drush fst command yes?
    – Clive
    Jul 22, 2016 at 14:50
  • No - I installed foundation manually.. Should I go back and do it this way?
    – MG1
    Jul 22, 2016 at 14:54
  • 1
    Both errors seem to point to the same problem - you're not running drush from a Drupal environment. Does the file /Users/Marianna/Documents/Sites/Link-New/index.php exist?
    – Clive
    Jul 22, 2016 at 15:17
  • 1
    You can follow the answer which I have given to your previous question, drupal.stackexchange.com/questions/207881/…. That will solve the issue of Drupal environment and php.
    – CodeNext
    Jul 22, 2016 at 15:25
  • 1
    Yes you can skip the first step if you have already installed. Go for second step, that is important to solve this issue.
    – CodeNext
    Jul 22, 2016 at 15:30

1 Answer 1

2

The issue mostly will be with environment/php and this is issue with MAMP (mismatch of path your MAMP-php and Server-php). Follow this link from that article.

The Solution: A Symlink

For the sake of ease, let’s just make your terminal sessions use the same PHP executable as MAMP. So run this:

$ mv /usr/bin/php /usr/bin/php.bak 
$ ln -s /Applications/MAMP/bin/php/php5.5.3/bin/php /usr/bin/php

But you need to check path as per your folders.

Your Answer

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

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