title: Using composer with php in non standard location
body: <p>I'm trying to use composer on my NAS (a good old D-Link DNS-323 running the incredibly good fonz fun plug 0.7).</p>
  
  <p>I have my php installed in <code>/ffp/bin/php</code>.</p>
  
  <p>When I install composer using the following command</p>
  
  <pre><code> php -r "readfile('https://getcomposer.org/installer');" | php -- --install-dir=/ffp/sbin --filename=composer
  </code></pre>
  
  <p>But when I do a simple <code>less /ffp/sbin/composer</code>, I have the following shebang set : </p>
  
  <pre><code>#!/usr/bin/env php
  &lt;?php
  /*
   * This file is part of Composer.
   *
  </code></pre>
  
  <p>Unfortunatly, my NAS do not have the <code>/usr/bin/env</code> folder existing on my machine ...
  So, how can I have composer referring to the correct php executable ?</p>
  
  <p>Besides, I tried changing the declaration to use <code>#!/ffp/bin/php</code>, but when doing so, any composer run echoes the following result :</p>
  
  <pre><code>PHP Warning:  PHP Startup: Unable to load dynamic library '/ffp/lib/php/extensions/no-debug-non-zts-20100525/gd.so' - File not found in Unknown on line 0
  Warning: PHP Startup: Unable to load dynamic library '/ffp/lib/php/extensions/no-debug-non-zts-20100525/gd.so' - File not found in Unknown on line 0
  PHP Warning:  PHP Startup: Unable to load dynamic library '/ffp/lib/php/extensions/no-debug-non-zts-20100525/sqlite.so' - File not found in Unknown on line 0
  Warning: PHP Startup: Unable to load dynamic library '/ffp/lib/php/extensions/no-debug-non-zts-20100525/sqlite.so' - File not found in Unknown on line 0
  PHP Fatal error:  Uncaught exception 'PharException' with message 'phar "/mnt/HD_a2/ffp/sbin/composer" has a broken signature' in /mnt/HD_a2/ffp/sbin/composer:23
  Stack trace:
  #0 /mnt/HD_a2/ffp/sbin/composer(23): Phar::mapPhar('composer.phar')
  #1 {main}
    thrown in /mnt/HD_a2/ffp/sbin/composer on line 23
  Fatal error: Uncaught exception 'PharException' with message 'phar "/mnt/HD_a2/ffp/sbin/composer" has a broken signature' in /mnt/HD_a2/ffp/sbin/composer:23
  Stack trace:
  #0 /mnt/HD_a2/ffp/sbin/composer(23): Phar::mapPhar('composer.phar')
  #1 {main}
    thrown in /mnt/HD_a2/ffp/sbin/composer on line 23
  </code></pre>
  
  <p>Of particular importance is the line</p>
  
  <pre><code>PHP Fatal error:  Uncaught exception 'PharException' with message 'phar "/mnt/HD_a2/ffp/sbin/composer" has a broken signature' in /mnt/HD_a2/ffp/sbin/composer:23
  </code></pre>
  
  <p>How can i fix it ? In other words, how can I have a working php + composer installation on my NAS ?</p>