Skip to content

feature request: 3rd party php extensions installation and enabling. #99

Description

@umefarooq

I have question how easy with flockphp to install 3rd party php extensions like php oracle driver, or sqlserv extension for any php version. i was using herd faced same issue with herd and moved back to valet because 3rd party extension installation support was not there.

it is not even easy on mac with brew installed php version to install 3rd party extensions. oracle driver installation required more steps. Right now i am using phpmon with valet you can easily enable and disable php first party extensions.

Activity

  1. added
    help wantedApproved: anyone may open a PR for this issue
    and removed on Nov 4, 2026
  2. added theissue type on Nov 4, 2026
  3. onairmarc commented on Nov 4, 2026

    @onairmarc
    Member

    I'd like to see a one-click install for extensions to make it as easy as possible for users to add non-standard extensions. If we don't support an extension via one-click install then we need to have a way "upload" an extension into the PHP installation. The term "upload" here really is just browsing for where the extension is on disk and then copying that file to where Flock needs it ti be,

  4. umefarooq commented on Nov 4, 2026

    @umefarooq
    Author

    if you have look on phpmon it has one-click install first party php extensions. Please check screenshot. Also you can change php version for which you want to install extensions.

    Image
  5. umefarooq commented on Nov 5, 2026

    @umefarooq
    Author
  6. rajtik76 commented on Nov 6, 2026

    @rajtik76

    Following up on your reply in #107, @lukas-frey: agreed, imap shouldn't load for every project. Here's how I'd start on per-version enabling, keeping the first PR small.

    Enabling extensions per PHP version

    • flock ext enable <name> --php 8.4 and flock ext disable <name> --php 8.4 (without --php, the project's version).
    • Enabled means php/<minor>/conf.d/20-<name>.ini with extension = <name>. Same model as Debian's phpenmod and the Docker image's docker-php-ext-enable: ext/ is what's available, conf.d is what's on, and php.ini stays the user's. The file survives PHP updates (place() only replaces bin/, ext/ and LICENSES/), and FrankenPHP reads its own conf.d, so thread-unsafe extensions like imap stay out of it without a special case.
    • Only shared extensions present in ext/, and only after they load in a test run (php -n -d extension=… -m), so a broken one can't take the version down. Then that version's FPM pool restarts; the CLI picks it up right away.
    • The opt-in list starts with just imap. Everything Flock loads today keeps loading.
    • flock ext and the php_extensions MCP tool, which share the same check, report a required extension that's available but off, with the command to turn it on.

    Later, separate PRs

    • Disabling extensions that are on by default.
    • Toggles in the apps' PHP settings.
    • Installing or uploading extensions Flock doesn't ship (the one-click install and upload from the comment above).

    For imap there'd be nothing to enable without flock-php/binaries#48. It only builds imap.so (plus the Windows DLL for 8.4+) and loads nothing. Do you want to keep it for this? If the direction works for you, I can take the first part.

  7. cristianovalenca commented on Nov 8, 2026

    @cristianovalenca

    Adding two concrete cases from projects I work on. flock ext reports both extensions as unavailable:

    # macOS, PHP 8.4
    ✗ ffi       required by codewithkyrian/transformers, jcupitt/vips — Flock's PHP 8.4 doesn't include it
    
    # Linux (Arch), PHP 8.5
    ⚠ Requires the PHP extension rdkafka, which Flock's PHP 8.5 doesn't include
    

    Both are hard dependencies of existing Laravel apps, so those sites can't run on Flock today (the second one shows up as a warning in flock sites).

    They probably sit at different points of the plan discussed here:

    • ffi ships with PHP itself, so it looks like a good candidate for the opt-in, per-version enabling described above (flock ext enable ffi --php 8.4), without being loaded for every project. Note that jcupitt/vips also needs libvips on the machine, so enabling the extension alone may not be enough for that package.
    • rdkafka is a PECL extension that also needs librdkafka, so it would depend on the later "install or upload extensions Flock doesn't ship" part.

    I'm not asking to bundle either one for everyone. A per-version opt-in matches what you said in #107. Happy to test whatever comes out of this on macOS and on Arch Linux.

  8. onairmarc commented on Nov 8, 2026

    @onairmarc
    Member

    Yep! This is on our roadmap! If anyone in the community wants to take a shot at contributing this, it would be greatly appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions