0

I was trying to put my Laravel app on Heroku. I followed the guide on Heroku's getting started page combined with Matt Staufer's guide. I could push my app and get the dyno running. But when I open the page there is only a warning for application error. Checked the log and found this:

2015-01-31T05:12:29.062101+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=lifestak.herokuapp.com request_id=39e8245d-1344-492e-8bb2-06b3292cac9b fwd="120.168.0.178" dyno= connect= service= status=503 bytes=
2015-01-31T05:12:31.452920+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=lifestak.herokuapp.com request_id=156fb3e5-e2e2-4e09-a4c0-fb3c00d0829c fwd="120.168.0.178" dyno= connect= service= status=503 bytes=
2015-01-31T05:15:06.574919+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=lifestak.herokuapp.com request_id=57184fb2-ba73-48f2-8067-e7f73d47504e fwd="180.250.31.37" dyno= connect= service= status=503 bytes=
2015-01-31T05:15:08.731264+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=lifestak.herokuapp.com request_id=2f53626a-39b3-4fb8-8f3b-cbaaa7bd3ad2 fwd="180.250.31.37" dyno= connect= service= status=503 bytes=
2015-01-31T05:26:04.233233+00:00 heroku[web.1]: State changed from crashed to starting
2015-01-31T05:26:06.249014+00:00 heroku[web.1]: Starting process with command `vendor/bin/heroku-php-apache2 public/`
2015-01-31T05:26:07.962757+00:00 app[web.1]: bash: vendor/bin/heroku-php-apache2: No such file or directory
2015-01-31T05:26:08.771145+00:00 heroku[web.1]: State changed from starting to crashed
2015-01-31T05:26:08.758422+00:00 heroku[web.1]: Process exited with status 127

Seems like an error with the apache? I thought it should be provided by the Heroku server? I am kind of lost here. FYI I create the Laravel app first, develop on it, and then create a Heroku app out of it. Procfile and composer.lock are there.

Thanks for the help.

1 Answer 1

2

Ok, found the problem. My app crashed since I use some Node modules in it and Heroku detected it as both PHP and Node app. The solutions is to declare the buildpack before you install any Node module in Laravel.

heroku config:set BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-php
Sign up to request clarification or add additional context in comments.

1 Comment

This was happening to me as well. I added Heroku to a project in progress in which I was using grunt for some simple tasks. Heroku read the package.js file and assumed the project was a node app.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.