title: Can't get PHP Command Line Script to execute without prepending 'php' despite shebang added and path to symlinked executable added to PATH
body: <p>I'm trying to create something similar to the laravel installer, it's a PHP Script that utilises Symfony's Console Component. It all works fine except I can't seem to get the damn thing to execute globally on my command line.</p>
  
  <p>I've currently got the script(boiler) stored as /dir/dir/vendor/author/packagename/boiler.</p>
  
  <p>Via Composer I also have a symlink that points to the script from /dir/dir/vendor/bin/. Automatically done via bin in composer.json.</p>
  
  <p>I've updated my $PATH, which now shows /folder/folder/vendor/bin/ to point to the symlink;</p>
  
  <p>My script starts:</p>
  
  <pre><code>#!/usr/bin/env php
  </code></pre>
  
  <p>Permissions are:</p>
  
  <pre><code>-rwxr-xr-x
  </code></pre>
  
  <p>I'm running Zshell on Mac OSX.</p>
  
  <hr>
  
  <p>It will run if I go into the directory and type <code>php boiler</code> but <code>boiler</code>returns command not found and if I'm in a different directory <code>boiler</code> also returns command not found. <code>php boiler</code> returns "Could not open input file: boiler"</p>
  
  <p>The laravel installer runs exactly as I want mine to, using just laravel whilst anywhere on the command line.</p>
  
  <p>At a complete loss. Google isn't turning up any similar issues, and neither is Stack (My searching ability may be lacking though, it's 4am.)</p>