Over a million developers have joined DZone.

Fixing Common Errors With the PHP Buildpack in Bluemix

Learn more about how Canonical's recent dropping of support for lucid64 impacts the basis for Cloud Foundry buildpacks.

· Cloud Zone

Download the Essential Cloud Buyer’s Guide to learn important factors to consider before selecting a provider as well as buying criteria to help you make the best decision for your infrastructure needs, brought to you in partnership with Internap.

Following up from my previous post, Canonical recently dropped support for lucid64 which is Ubuntu 10.04 LTS. This affects Cloud Foundry as lucid64 is the basis for most buildpacks. In Cloud Foundry lucid64 is being phased out for Ubuntu 14.04 LTS which is known as cflinuxfs2 in Cloud Foundry.

Getting stacks in org jbsloyer@us.ibm.com / space dev as jbsloyer@us.ibm.com...

name         description   
lucid64      Ubuntu 10.04    
cflinuxfs2   Ubuntu 14.04.2 trusty

The PHP buildpack will take the default system buildpack and right now in Bluemix it is lucid64. This will throw some errors when you try to push your PHP app, for example something like below.

It looks like you're deploying on a stack (currently set to *lucid64*) that's not supported by this buildpack.
That could be because you're using a recent buildpack release on a deprecated stack.
If you're using the buildpack installed by your CF admin, please let your admin know you saw this error message.
If you at one point specified a buildpack that's at git URL, please make sure you're pointed at a version that supports this stack.
Staging failed: Buildpack compilation step failed


To fix it you just need to use the -s cflinuxfs2 argument for the cf push command.

cf push myapp -b https://github.com/cloudfoundry/php-buildpack.git -s cflinuxfs2

Check out this video for a walk through on how to fix the issue and an explanation of it.

I would love to hear your feedback and any suggestions you have, please reach out to me on Twitter @jsloyer

The Cloud Zone is brought to you in partnership with Internap. Read Bare-Metal Cloud 101 to learn about bare-metal cloud and how it has emerged as a way to complement virtualized services.

bluemix ,cloud ,php ,linux ,cloud foundry

Published at DZone with permission of Jeff Sloyer. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}