-
-
Notifications
You must be signed in to change notification settings - Fork 364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Load extension dynamically #26
Comments
I had an idea: each php archive could provide its own |
This is a nice solution. However we could also go with a solution similar to, for example, platform.sh: https://docs.platform.sh/languages/php/ini.html We could allow to set php.ini values in php:
configuration:
memory_limit: 256M For enabling extensions: php:
extensions:
- mongodb
- redis I am 100% for building and including standard extensions into Bref, I just don't want to enable all of them by default to avoid slowing down PHP's start time (since we start a PHP process on every request). So if we are talking about redis and mongodb I think it would be way better to build them in build.sh and the Dockerfile by default, and enable them with Later, if someone wants to build its own custom extension, then we can find a solution. But I think it's a rare use case, it's fine if we don't address it right now. What do you think? |
Ok I though the idea was to provide the simplest package possible and let users to create their own. If you're ok to provide all standard extensions, then you're right, we should enable them in I'll close #28 and make a new one. |
Great. Yeah I think many people will want to use redis and/or mongodb so that's great if it's 1 line of code to enable it, instead of recompiling PHP from scratch. |
Test building everything
As done in #14 with
opcache.so
, I tried to load more extensions dynamically.I was able to compile Redis and MongoDB extensions with a bit tweaked version of
bin/php/Dockerfile
andbin/php/build.sh
.Then I created a tar archive containing those two extensions in the
ext
directory.And finally I used the following hook to make php binary load those extensions:
A
phpinfo()
confirms that those two extensions are correctly loaded.I think this could be done in a better way, especially the
php.ini
update.What do you think?
The text was updated successfully, but these errors were encountered: