Heroku Procfile not working

Pablo

I'm trying use Nginx + Phalcon. So I have the root folder (app) and my public folder (app/public).

Inside the root (app) I have the Procfile:

web: vendor/bin/heroku-php-nginx -C nginx_app.conf public/

And inside my public folder I have my index.php

<?php exit('hello');

With this simple example, shouldn't print hello when I access the url myapp.herokuapp.com?

If my thought is right, which is not working. My second problem is that the nginx_app.conf seems that are not been reading by the server. Because every f* page that I tried access I got 404.

So, what am I doing wrong?

[UPDATED]

Here's the log:

heroku[web.1]: State changed from down to starting
heroku[web.1]: Starting process with command `php -S 0.0.0.0:57262`
heroku[web.1]: State changed from starting to up
app[web.1]: [Tue Apr  7 11:08:07 2015] 10.185.81.31:28258 Invalid request (Unexpected EOF)
app[web.1]: [Tue Apr  7 11:08:07 2015] 172.19.28.141:33686 Invalid request (Unexpected EOF)
heroku[router]: at=info method=GET path="/" host=myapp.herokuapp.com request_id=d39f119a-fd95-4887-809f-74712925606f fwd="200.221.158.131" dyno=web.1 connect=2ms service=4ms status=404 bytes=668
app[web.1]: [Tue Apr  7 11:08:44 2015] 10.61.196.230:38679 [404]: / - No such file or directory

[UPDATED]

$ git push ...
[...]
remote: -----> Discovering process types
remote:        Procfile declares types -> web

$ heroku run bash
$ cat Procfile
~ $ : vendor/bin/heroku-php-nginx public/~ $

And according the documentation should be

heroku run bash
Running `bash` attached to terminal... up, run.5662
$ cat Procfile
web: vendor/bin/heroku-php-apache2

A little detail that I have tried:

cat Procfile
~ $ vendor/bin/heroku-php-nginx public/c/~ $
vendor/bin/heroku-php-nginx public/
DOCUMENT_ROOT changed to 'public/'
Optimzing defaults for 1X dyno...
4 processes at 128MB memory limit.
Starting php-fpm...
Starting nginx...

I'm waiting... let's see what happens

dzuelke

Something is wrong with your Procfile; as you can see, Heroku is booting in the default php -S mode. This happens when a Procfile is present, but no "web" process type is declared; this should also be written out in a message towards the very end of a git push heroku master (something about the Procfile not declaring a "web" process type and it then using a default).

That rules out your Procfile not being checked into Git or having the wrong name (e.g. lowercase procfile).

The culprit is very, very likely a Unicode Byte Order Mark that the editor you're using is inserting at the beginning of the file: https://en.wikipedia.org/wiki/Byte_order_mark#UTF-8

So your Procfile doesn't look like this:

web: vendor/bin/heroku-php-nginx -C nginx_app.conf public/

but actually like this:

\0xEF\0xBB\0xBFweb: vendor/bin/heroku-php-nginx -C nginx_app.conf public/

Your editor (and most editors for that matter) simply don't display the BOM.

To fix the issue, save your Procfile without a BOM (and, while your at it, configure your editor to never save a UTF-8 BOM, because its use is highly discouraged and causes myriads of problems just like this one).

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Procfile in Heroku

From Dev

Procfile Heroku

From Dev

heroku $PORT variable in Procfile

From Dev

Heroku, Procfile and gitignore

From Dev

How to create a Procfile for Python in Heroku?

From Dev

Heroku Flask Tutorial Procfile Meaning

From Dev

Heroku looking for Procfile in wrong directory

From Dev

ruby and heroku procfile for web app

From Dev

Difference between Procfile and Procfile.Windows in heroku servers

From Dev

Heroku Procfile won't run Django app

From Dev

"No Procfile detected" in Sinatra app heroku push

From Dev

Rails app using Thin and SSL on Heroku (Procfile)

From Dev

"No Procfile detected" in Sinatra app heroku push

From Dev

Heroku No such process type web defined in procfile

From Dev

Heroku: No such process type worker defined in Procfile

From Dev

Procfile not found when deploying app to heroku

From Dev

Do I need a Procfile to push a Sinatra app to Heroku?

From Dev

Heroku. New Relic Procfile command doesn't work

From Dev

What does "--log-file -" mean in Heroku procfile?

From Dev

HEROKU: ps:scale web=1 no such process type web defined in Procfile

From Dev

Heroku, Java, Procfile, Could not find or load main class

From Dev

Can we have two workers with different jobs in Procfile for Heroku?

From Dev

"bundler: command not found: unicorn" after adding Procfile as told by Heroku Bamboo to Cedar migration guide

From Dev

How do you import a custom module with Gunicorn in a Procfile when deploying to Heroku?

From Dev

Anyway to be able to push to heroku master with Procfile and requirments.txt in a seperate folder

From Dev

Django-twoscoops-project (skeleton) on Heroku via Gunicorn. How to set Procfile?

From Dev

" npm ERR! missing script: start" at Heroku despite set up in package.json and Procfile

From Dev

Heroku Comodo SSL and it not working?

From Dev

Image Magick not working on Heroku

Related Related

  1. 1

    Procfile in Heroku

  2. 2

    Procfile Heroku

  3. 3

    heroku $PORT variable in Procfile

  4. 4

    Heroku, Procfile and gitignore

  5. 5

    How to create a Procfile for Python in Heroku?

  6. 6

    Heroku Flask Tutorial Procfile Meaning

  7. 7

    Heroku looking for Procfile in wrong directory

  8. 8

    ruby and heroku procfile for web app

  9. 9

    Difference between Procfile and Procfile.Windows in heroku servers

  10. 10

    Heroku Procfile won't run Django app

  11. 11

    "No Procfile detected" in Sinatra app heroku push

  12. 12

    Rails app using Thin and SSL on Heroku (Procfile)

  13. 13

    "No Procfile detected" in Sinatra app heroku push

  14. 14

    Heroku No such process type web defined in procfile

  15. 15

    Heroku: No such process type worker defined in Procfile

  16. 16

    Procfile not found when deploying app to heroku

  17. 17

    Do I need a Procfile to push a Sinatra app to Heroku?

  18. 18

    Heroku. New Relic Procfile command doesn't work

  19. 19

    What does "--log-file -" mean in Heroku procfile?

  20. 20

    HEROKU: ps:scale web=1 no such process type web defined in Procfile

  21. 21

    Heroku, Java, Procfile, Could not find or load main class

  22. 22

    Can we have two workers with different jobs in Procfile for Heroku?

  23. 23

    "bundler: command not found: unicorn" after adding Procfile as told by Heroku Bamboo to Cedar migration guide

  24. 24

    How do you import a custom module with Gunicorn in a Procfile when deploying to Heroku?

  25. 25

    Anyway to be able to push to heroku master with Procfile and requirments.txt in a seperate folder

  26. 26

    Django-twoscoops-project (skeleton) on Heroku via Gunicorn. How to set Procfile?

  27. 27

    " npm ERR! missing script: start" at Heroku despite set up in package.json and Procfile

  28. 28

    Heroku Comodo SSL and it not working?

  29. 29

    Image Magick not working on Heroku

HotTag

Archive