1
votes

We have an application running in PHP5 (Symfony 2.8 with MongoDB), but we have issues with the Mongo driver in this version, that we don't have with PHP7 and ext-mongodb. So I'm trying to migrate the project to PHP7.

Everything works fine locally, but on Bluemix we have this issue:

Your requirements could not be resolved to an installable set of packages.
  Problem 1
    - The requested PHP extension ext-mongodb ^1.2 has the wrong version (1.1.2) installed. Install or enable PHP's mongodb extension.
...

This extension and version is required by some dependencies, but I can't get it installed via composer. The dependency is explicit in the composer.json:

    "require": {
        "php": "7.0.*",
        "ext-mongodb": "*",
        ...

I went to php-buildpack project, to see what is the provided version of the extension in php-buildpack 4.3.10 (which is the version currently used by Bluemix, and it's OLD!!!!), but there's no version, just a note on the extension available:

https://github.com/cloudfoundry/php-buildpack/releases/tag/v4.3.10

How can I manage to get the version 1.2.0 of ext-mongodb?

Thanks!

1
It's possible to use a newer version of the buildpack. On your cf push you specify the buildpack URL, something like -b https://github.com/cloudfoundry/php-buildpack.git#v4.3.33. - opiethehokie
Hello, that's what I'm working on since I posted the question, however I'm not at ease with using a community version. If it's the only solution, I'll go with it. However, the same app is not working with version 4.3.33 of the buildpack, and there's no log to know what happens... - Karreg

1 Answers

1
votes

I have tester with the cloudfoundry php-buildpack from github, the latest version being 4.3.33 (versus 4.3.10 on Bluemix) and it's not working at all. App is running, but not executing, and there's no log.

However, I have tried the version 4.3.30 and it's working fine.

I guess that's the best solution to run a recent version of php-buildpack instead of trying to update an older one...