title: Deploying PHP Laravel 4.2 to Heroku fails
body: <p>I've got a simple Laravel 4.2 app that works on my local Homestead machine.     I'm running OSX Yosemite, with VirtualBox.</p>
  
  <p>I can't however deploy it to Heroku.  I've got a basic Procfile:</p>
  
  <pre><code>web: vendor/bin/heroku-php-apache2 public/
  </code></pre>
  
  <p>I've also set my build pack using </p>
  
  <pre><code>heroku buildpacks:set heroku/php
  </code></pre>
  
  <p>This is the output I get when I run the following command from my mac terminal:</p>
  
  <pre><code>git push heroku master
  </code></pre>
  
  <p>OUTPUT:</p>
  
  <pre><code>Counting objects: 4305, done.
  Delta compression using up to 2 threads.
  Compressing objects: 100% (4100/4100), done.
  Writing objects: 100% (4305/4305), 4.18 MiB | 93.00 KiB/s, done.
  Total 4305 (delta 1298), reused 0 (delta 0)
  remote: Compressing source files... done.
  remote: Building source:
  remote: 
  remote: -----&gt; Using set buildpack heroku/php
  remote: -----&gt; PHP app detected
  remote: -----&gt; Bootstrapping...
  remote: -----&gt; Installing system packages...
  remote:        NOTICE: No runtime required in composer.json; requirements
  remote:        from dependencies in composer.lock will be used for selection
  remote:        - php (7.0.3)
  remote:        - Apache (2.4.16)
  remote:        - Nginx (1.8.0)
  remote: -----&gt; Enabling PHP extensions...
  remote:        - ext-zend-opcache (automatic)
  remote: -----&gt; Installing dependencies...
  remote:        Composer version 1.0.0-alpha11 2015-11-14 16:21:07
  remote:        Loading composer repositories with package information
  remote:        Installing dependencies from lock file
  remote:          - Installing guzzlehttp/streams (2.1.0)
  remote:            Downloading: 100%
  remote:        
  remote:          - Installing guzzlehttp/guzzle (4.2.3)
  remote:            Downloading: 100%
  remote:        
  remote:          - Installing symfony/translation (v2.5.12)
  remote:            Downloading: 100%
  remote:        
  remote:          - Installing symfony/security-core (v2.5.12)
  remote:            Downloading: 100%
  remote:        
  remote:          - Installing symfony/routing (v2.5.12)
  remote:            Downloading: 100%
  remote:        
  remote:          - Installing symfony/process (v2.5.12)
  remote:            Downloading: 100%
  remote:        
  remote:          - Installing symfony/http-foundation (v2.5.12)
  remote:            Downloading: 100%
  remote:        
  remote:          - Installing symfony/event-dispatcher (v2.8.2)
  remote:            Downloading: 100%
  remote:        
  remote:          - Installing symfony/debug (v2.5.12)
  remote:            Downloading: 100%
  remote:        
  remote:          - Installing psr/log (1.0.0)
  remote:            Downloading: 100%
  remote:        
  remote:          - Installing symfony/http-kernel (v2.5.12)
  remote:            Downloading: 100%
  remote:        
  remote:          - Installing symfony/finder (v2.5.12)
  remote:            Downloading: 100%
  remote:        
  remote:          - Installing symfony/dom-crawler (v2.5.12)
  remote:            Downloading: 100%
  remote:        
  remote:          - Installing symfony/css-selector (v2.5.12)
  remote:            Downloading: 100%
  remote:        
  remote:          - Installing symfony/console (v2.5.12)
  remote:            Downloading: 100%
  remote:        
  remote:          - Installing symfony/browser-kit (v2.5.12)
  remote:            Downloading: 100%
  remote:        
  remote:          - Installing swiftmailer/swiftmailer (v5.4.1)
  remote:            Downloading: 100%
  remote:        
  remote:          - Installing stack/builder (v1.0.3)
  remote:            Downloading: 100%
  remote:        
  remote:          - Installing predis/predis (v0.8.7)
  remote:            Downloading: 100%
  remote:        
  remote:          - Installing phpseclib/phpseclib (0.3.10)
  remote:            Downloading: 100%
  remote:        
  remote:          - Installing patchwork/utf8 (v1.3.0)
  remote:            Downloading: 100%
  remote:        
  remote:          - Installing nesbot/carbon (1.17.0)
  remote:            Downloading: 100%
  remote:        
  remote:          - Installing monolog/monolog (1.17.2)
  remote:            Downloading: 100%
  remote:        
  remote:          - Installing nikic/php-parser (v0.9.5)
  remote:            Downloading: 100%
  remote:        
  remote:          - Installing jeremeamia/superclosure (1.0.2)
  remote:            Downloading: 100%
  remote:        
  remote:          - Installing ircmaxell/password-compat (v1.0.4)
  remote:            Downloading: 100%
  remote:        
  remote:          - Installing filp/whoops (1.1.10)
  remote:            Downloading: 100%
  remote:        
  remote:          - Installing d11wtq/boris (v1.0.8)
  remote:            Downloading: 100%
  remote:        
  remote:          - Installing symfony/filesystem (v2.8.2)
  remote:            Downloading: 100%
  remote:        
  remote:          - Installing classpreloader/classpreloader (1.0.2)
  remote:            Downloading: 100%
  remote:        
  remote:          - Installing laravel/framework (v4.2.19)
  remote:            Downloading: 100%
  remote:        
  remote:        Generating optimized autoload files
  remote:        &gt; php artisan clear-compiled
  remote:        Mcrypt PHP extension required.
  remote:        Script php artisan clear-compiled handling the post-install-cmd event returned with an error
  remote:        
  remote:        
  remote:                              
  remote:          [RuntimeException]  
  remote:          Error Output:       
  remote:                              
  remote:        
  remote:        
  remote:        install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--] [&lt;packages&gt;]...
  remote:        
  remote:        
  remote: 
  remote:  !     Push rejected, failed to compile PHP app
  remote: 
  remote: Verifying deploy....
  remote: 
  remote: !   Push rejected to agile-wildwood-99938.
  remote: 
  To https://git.heroku.com/agile-wildwood-99938.git
   ! [remote rejected] master -&gt; master (pre-receive hook declined)
  error: failed to push some refs to 'https://git.heroku.com/agile-wildwood-     99938.git'
  </code></pre>
  
  <p>Its worth noting on my local machine, when I run (from my laravel project root folder)</p>
  
  <pre><code>php artisan
  </code></pre>
  
  <p>I get a message similar to the output from the Heroku deploy, namely </p>
  
  <pre><code>Mcrypt PHP extension required.
  </code></pre>
  
  <p>I don't know if this is relevant?  Could absence of Mcrypt on my local machine effect the Heroku deploy, or is the Heroku output referring entirely to the Heroku server?</p>
  
  <p>I'm struggling a bit here. Would appreciate some help.</p>
  
  <p>Thanks kindly
  Charlie</p>