Skip to content
Back

How to load extra PHP extensions?

  • 0
  • Self Hosted
  • Functions
  • Tools
Renzo
29 Aug, 2024, 12:04

Is it possible to load extra php extensions? I managed to build for example the intl package but it's not added to the runtime.

I have tried adding to the build settings (commands): apk add icu-dev && docker-php-ext-install intl apk add icu-dev && docker-php-ext-install intl And the same thing to pre-package-install in the compose file. The default image is too barebones to be actually usefull (as a runtime compared to node etc.).

This pull request seems to indicate this should be possible: https://github.com/open-runtimes/open-runtimes/pull/127

Thanks!

TL;DR
Developers want to know how to load extra PHP extensions such as Intl in the current setup. One developer suggests specifying the extra extensions in the `commands` parameter in the `appwrite.json` file. Another developer suggests looking into custom images, as it seems like the default image is too barebones to be useful. A pull request on GitHub indicates that loading extra PHP extensions should be possible.
Renzo
29 Aug, 2024, 12:50

The above does work, but obviously, the build step does not retain container changes after cleanup etc. Should have thought of that. Is there an other way this can be achieved? Custom images could be a way, but that doens't seem to be supported

ideclon
29 Aug, 2024, 12:56

I believe this should be going in the commands parameter in your appwrite.json

Renzo
29 Aug, 2024, 13:00

Thanks, this is what I meant with build settings, edited to clarified that! Unfortunatly, this only runs once on deploy (to create your code package outside of the container). If the container is called or recreated during it's lifetime, these changes are gone.

ideclon
29 Aug, 2024, 13:01

Oh, I remember some talk at some point about this. Unfortunately, I don't really know enough about how it works to have any other useful answer here, sorry

Renzo
29 Aug, 2024, 13:02

Thanks, I'll have a look on the youtube channel if I can spot it

Renzo
30 Aug, 2024, 13:27

I guess this is not possible in the current setup. Are there any plans on adding own images or adding critical modules like Intl?

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more