cloudfoundry / cloudfoundry/php-buildpack

Unable to specify/add php modules for the "cli"

Open
#1,157 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
141
Forks
348
Avg merge
8h 37m
Merged PRs (30d)
2

Description

Hi, i am working to port a php application in my Cloudfoundry, using :

buildpack: https://github.com/cloudfoundry/php-buildpack/releases/download/v4.6.26/php-buildpack-cflinuxfs4-v4.6.26.zip stack: cflinuxfs4

the compose.json requires "fileinfo" and "gd" and even if the modules are specified as per documentation:

.bp-config/php/php.ini.d/custom.ini

extension=mysqli.so extension=redis.so extension=curl.so extension=gd.so extension=xsl.so extension=mbstring.so extension=soap.so extension=openssl.so extension=fileinfo.so extension=imagick.so zend_extension=opcache.so

if i check the extension via browser (so using the stack apache -> phpfpm) i can see the extensions, but those are not loaded in the CLI so the composer install always fails.

any chances i can specifiy php extension in the CLI during build?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the documented path .bp-config/php/php.ini.d/custom.ini and compare how the buildpack configures PHP-FPM versus the CLI used by composer install. Reproduce the missing fileinfo and gd modules in the CLI, then verify that the requested extensions load during the build without breaking the browser-served PHP runtime.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
build-system, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.