3

Unfortunately, i use shared hosting for my dev site to show to clients.

I'd like to specify an ini path in my example.aliases.drush.php file.

I couldn't find that particular custom variable in the example file.

Is it possible to set the drush.ini path so i don't get these nagging open basedir errors?

<?php
        $aliases['dev'] = array(
        'remote-host' => 'foohost',
        'root' => '/home/xxxxxx/users/.home/domains/xxxxxx/html',
        'php' => '/usr/bin/php',
        'path-aliases' => array(
         '%drush' => '$HOME/bin/drush/',
         '%drush-ini'=>'/home/xxxxxx/etc/drush.ini',
         '%drush-script' => '$HOME/bin/drush/drush/drush.php',
         '%dump' => ' ../db/dev.xxx.sql',
        '%files' => 'sites/all/files',
        ),
    );
  • 1
    buddy you raised a good question - you deserve a monster congrats - sure thing! – zero Feb 17 '12 at 1:33
4

Drush processes drush.ini in the drush bash script prior to calling drush.php. Here is the relevant code it uses:

for conf_dir in $(dirname "$SELF_PATH") /etc/drush $HOME/.drush ; do
  if [ -f $conf_dir/php.ini ] ; then
    drush_php_ini=$conf_dir/php.ini
  fi
  if [ -f $conf_dir/drush.ini ] ; then
    drush_php_override=$conf_dir/drush.ini
  fi
done

You will need to make sure that your drush.ini file is in one of those location in order for it to be found and processed. Note that the drush bash script never acts on command line parameters; those are parsed in php. There are some environment variables that affect the drush bash script, but there are no environment variables that affect the selection of drush.ini, and there is no facility in site aliases to pass environment variable values to drush on the remote machine.

Sorry.

Edit: You could try setting %drush-script in your alias file to point to a script on the remote machine that called php /path/to/drush/drush.php. Read the advice in the README.txt for Drush-4 on how to make an alias to drush.php if you do this; you will want to make sure that --php is passed to Drush correctly, etc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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