Go to the Stanford University web site
or
Log In
(To add something to the Commons.)

drush

Using Drush to Download from Stanford's Features Server

If you want to use drush to download from Stanford's Drupal Features server, use the following syntax:

drush dl projectname --source=http://drupalfeatures.stanford.edu/fserver/projectname/core.version

E.g., to download webauth for Drupal 7, use:

drush sqlq formatting

How To

Ever get frustrated about the output from 'drush sqlq'?

Add '--extra="-t"' to your 'drush sqlq' command, and get a nicely-formatted table. ("--extra" allows you to include any options you would pass to 'mysql').

(Run 'man mysql' to see more options to pass to '--extra'.)

Drush error while loading shared libraries

If you try to issue a drush command on corn and receive the following error: php: error while loading shared libraries: libmysqlclient.so.15: cannot open shared object file: No such file or directory it is looking for php in the wrong location. Open your .cshrc and find:
if ( !

Drush PHP Error

Note that this error only occurs on Leland servers, since the retirement of pubsw.

If you get an error like this when running any drush command:

php: error while loading shared libraries: libmysqlclient.so.15: cannot open shared object file: No such file or directory

Take a look at your ~/.cshrc file. In it, you will see a few lines like the following:

Backup AFS Drupal site shell script

I've written a shell script for backing up a Drupal site installed in a Stanford AFS group or department account. (This version doesn't work anywhere else.)

It does a dump of the Drupal database and creates a compressed archive of the entire Drupal directory from which it is run. Both the directory archive and .sql file are written to a DrupalBackups directory under the top level directory of the department or group account from which it is run. (If the DrupalBackups directory doesn't already exist, it is created.)