heroku-buildpack-php icon indicating copy to clipboard operation
heroku-buildpack-php copied to clipboard

Fail more gracefully when the requested PHP version was not found

Open CHH opened this issue 12 years ago • 2 comments

Now this error message happens when the PHP version doesn't exist:

Counting objects: 23, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (14/14), done.
Writing objects: 100% (14/14), 2.21 KiB | 0 bytes/s, done.
Total 14 (delta 8), reused 0 (delta 0)

-----> Fetching custom git buildpack... done
-----> PHP (composer.json) app detected
-----> Bundling NGINX 1.4.2
-----> Bundling PHP 5.5.3

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Exiting with failure status due to previous errors
-----> Bundling extensions
       phpredis
/tmp/buildpack_d26e2112-9da2-4fe1-8d37-f2eca37b71fd/bin/compile: line 122: php-config: command not found

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Exiting with failure status due to previous errors
       mongo
/tmp/buildpack_d26e2112-9da2-4fe1-8d37-f2eca37b71fd/bin/compile: line 122: php-config: command not found

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Exiting with failure status due to previous errors
cp: cannot create regular file `/app/vendor/php/etc/php-fpm.conf': No such file or directory

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

To [email protected]:MYAPP.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:MYAPP.git'

CHH avatar Oct 10 '13 15:10 CHH

What should the error be instead?

josegonzalez avatar Mar 26 '14 22:03 josegonzalez

I thought of simply failing with "PHP version x.y.z not found" instead of the weird sounding tar/gzip error and aborting the build immediately without trying to install extensions.

CHH avatar Mar 26 '14 23:03 CHH