CHH / heroku-buildpack-php

A more advanced PHP buildpack for Heroku, inspired by the Node.js buildpack
MIT License
265 stars 155 forks source link

Push Rejected using Buildpack #165

Open Indemnity83 opened 10 years ago

Indemnity83 commented 10 years ago

I have a basic CakePHP app which is so far only a clone of the friendsofcake/app-template. I setup environmental variables as defined in the app-template readme:

heroku config:set BUILDPACK_URL=https://github.com/CHH/heroku-buildpack-php
heroku config:set LOG_PATH=/app/vendor/php/var/log/
heroku config:set SECURITY_SALT=<my-salt>
heroku config:set SECURITY_CIPHER_SEED=<my-seed>

but when I push my repo to heroku I get a non-descript failure:

-----> Fetching custom git buildpack... done
-----> PHP (composer.json) app detected
-----> Bundling NGINX 1.4.4
-----> Bundling PHP 5.5.10
-----> Bundling extensions
       apcu
       phpredis
       mongo

 !     Push rejected, failed to compile PHP (composer.json) app

If I adjust the BUILDPACK_URL to git://github.com/CHH/heroku-buildpack-php#development I get slightly more information, but I'm not familiar enough with how these buildpacks work yet to locate the line being referenced.

-----> Fetching custom git buildpack... done
-----> PHP (composer.json) app detected
-----> Bundling NGINX 1.4.4
-----> Bundling PHP 5.5.10
-----> Bundling extensions
       apcu
       phpredis
       mongo
 !     Script error in /tmp/buildpack_d2d0b3810362adb2c4695c0d4c1550c2/bin/compile on or near line 368

 !     Push rejected, failed to compile PHP (composer.json) app

My repo is private, but I've made a gist of my current composer.json for scruteny in case its something I changed. I only added a couple libraries and scripts to aid in development and testing a CakePHP app.

Any thoughts?

Indemnity83 commented 10 years ago

I should note too that if I remove the BUILDPACK_URL env then the push is successful.

eddiejaoude commented 9 years ago

I am using symfony2 & get the same rejection with no error output...

git push -f heroku HEAD:master
Fetching repository, done.
Counting objects: 12, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (9/9), done.
Writing objects: 100% (9/9), 1.07 KiB | 0 bytes/s, done.
Total 9 (delta 6), reused 0 (delta 0)

-----> Fetching custom git buildpack... done
-----> PHP (composer.json) app detected
-----> Bundling NGINX 1.4.4
-----> Bundling PHP 5.5.10
-----> Bundling extensions
       apcu
       phpredis
       mongo

 !     Push rejected, failed to compile PHP (composer.json) app

To git@heroku.com:dial-tone-frontend-dev.git
 ! [remote rejected] HEAD -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:dial-tone-frontend-dev.git'
eddiejaoude commented 9 years ago

I did the same & moved to #development but still failing...

git push -f heroku HEAD:master
Fetching repository, done.
Counting objects: 12, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (9/9), done.
Writing objects: 100% (9/9), 1.07 KiB | 0 bytes/s, done.
Total 9 (delta 6), reused 0 (delta 0)

-----> Fetching custom git buildpack... done
-----> PHP (composer.json) app detected
-----> Bundling NGINX 1.4.4
-----> Bundling PHP 5.5.10
-----> Bundling extensions
       apcu
       phpredis
       mongo
 !     Script error in /tmp/buildpack_6ca38978f59be73e540676b5d5401ff3/bin/compile on or near line 368

 !     Push rejected, failed to compile PHP (composer.json) app

To git@heroku.com:dial-tone-frontend-dev.git
 ! [remote rejected] HEAD -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:dial-tone-frontend-dev.git'

If I used the official build pack, all my cache files have build_... in them & cause issues too

eddiejaoude commented 9 years ago

I tried again this morning with a new clean Symfony2 (from heroku & Symfony2 docs) project & the official build pack & this custom build pack. With still have the same issue as my project & the project mentioned above.

conroyp commented 9 years ago

I've been seeing the same thing with a basic Laravel app, which is a clone of one we built ok about 3 weeks ago. The same part of bin/compile is mentioned in my errors (https://github.com/CHH/heroku-buildpack-php/blob/master/bin/compile#L368) - I wonder if there's been a recent change inside heroku's setup that has caused these build commands to start failing?

Soulou commented 9 years ago

For our need, we have forked this buildpack https://github.com/Scalingo/appsdeck-buildpack-php, you may want to give it a try.

eddiejaoude commented 9 years ago

@Soulou thanks, I will take a look.

eddiejaoude commented 9 years ago

@Soulou It now appears to deploy successfully, however the routes do not work, 404 all the time on existing pages. Any ideas?

2014-11-30T09:15:44.326038+00:00 heroku[router]: at=info method=GET path="/hello/world" host=dial-tone-frontend-dev.herokuapp.com request_id=9fd3363b-9ed6-4389-95ca-1c1d69a3e924 fwd="80.5.64.178" dyno=web.1 connect=0ms service=87ms status=404 bytes=537
2014-11-30T09:15:44.371534+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=dial-tone-frontend-dev.herokuapp.com request_id=ceeedcf8-e8b5-4cdb-b902-845542e358b4 fwd="80.5.64.178" dyno=web.1 connect=0ms service=1ms status=304 bytes=169
2014-11-30T09:15:44.320489+00:00 app[web.1]: 80.5.64.178 - "GET /hello/world HTTP/1.1" 404 300 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36"
2014-11-30T09:15:44.366091+00:00 app[web.1]: 80.5.64.178 - "GET /favicon.ico HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36"

PS...

For our need, we have forked this buildpack https://github.com/Scalingo/appsdeck-buildpack-php, you may want to give it a try.

Just to let you know, it is not a fork, it would be good if it was then it can be traced etc.

screen shot 2014-11-30 at 09 18 23

JohnnyEvo commented 9 years ago

Same issue with my Symfony2 project. No more details...

eddiejaoude commented 9 years ago

@JohnnyEvo I have gone back to using the official build pack as Symfony fixed the cache issue I was having.

If you don't need anything specifically from this build pack, I suggest going back to the official one.

JohnnyEvo commented 9 years ago

@eddiejaoude Thank you, it's works :)

eddiejaoude commented 9 years ago

No problem :+1: