-
Notifications
You must be signed in to change notification settings - Fork 2k
it should enable --enable-mbstring
during compilation
#34
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
Comments
Do you think this needs to be enabled by default or would it be fine to have to add an |
Contrary to my other comments wrt enabling / disabling extensions, I think this extension should be enabled by default. Using UTF-8 has become the standard on the internet. Not using UTF-8 will be a rare exception, so I think that using mbstring is the right decision here. Even further, I think that overloading ( |
mbstring being a non-default extension, it's mandatory to recompile php with the flag enabled in order to activate it. Unless I'm wrong, there is no |
--with-mbstring
during compilation--enable-mbstring
during compilation
The only reason you don't have Using this POC commit, it's possible to build mbstring as a shared module in a separate build from the main PHP source. Here's an example of using it, lightly modified from the mbstring docs:
|
That being said, I actually do agree that mbstring should be compiled as static by default. |
ho, that's good to know! thanks for the feeback. |
@thaJeztah while I like the idea of encouraging new apps to use that default, I fear that making that the default for this image will break in the cases where someone is just trying to Dockerize an old PHP app (ahem, like me). If that app was not written to expect that override turned on by default, it seems like the app could break in subtle ways that might not be caught during initial testing (e.g. if i18n checks are not part of that initial testing). |
@md5 are you talking about I also think this option should not be activated by default, since it would potentially break expected behavior. |
Yes, that's what I was talking about. |
In all cases, |
@thaJeztah I thought you were suggesting that the image add a default |
lol yes, should have read back my earlier comment, making a total fool of myself here 😄 I thought enabling overloading by default would make sense, but perhaps you're right; when working on legacy projects it would be surprising behavior. I think I'm fine either way; both choices have their pros and cons. If we stay with the current setup (no php.ini) that's ok. |
+1 I would really appreciate having mbstring extension compiled by default |
In fact it's unfortunalty required by some libraries such as https://github.com/videlalvaro/php-amqplib, which forces me to use a non-official image (such as jolicode/php5*). |
This seems to work here: (I don't have RabbitMQ handy to test connecting through, but the demos do run and give back FROM php
RUN apt-get update && apt-get install -y git
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin
RUN docker-php-ext-install bcmath mbstring
RUN git clone https://github.com/videlalvaro/php-amqplib.git /usr/src/amqplib
WORKDIR /usr/src/amqplib
RUN composer.phar install |
ha, I haven't seen this Nevertheless, having mbstring without having to make a custom image would be cool. |
I voting 👍 for |
Support
|
No update on this? As many others, I would like to see this enabled by default. |
We have to draw the line of what to include by default and currently that line is "what must be compiled into php itself versus what can be added after". *following upstreams recommendations, of course. |
@yosifkit With a CentOS container, if I need mbstring, I can simply go Please find a way to allow this module (and others) to be enabled. Because without it this container is not usable. |
@macropin It isn't necessary to rebuild FROM php
RUN docker-php-ext-install mbstring I don't see any comments here that contradict that and my test from November 2014 seemed to work: #34 (comment) |
@md5 thanks. I didn't think that script was finalised. I didn't see any docs for it. Does this mean that the container will always be shipped with php sources included? |
@macropin The docs are unfortunately being truncated on Docker Hub, but you can read them here: https://github.com/docker-library/docs/blob/master/php/README.md#how-to-install-more-php-extensions The To answer your question, yes the container will always be shipped with the PHP source code. |
👍 I'd like to have mbstring already installed too with php7+ I think it could be enabled by default and with mbstring.func_overload set to 4 |
Voting for mbstring already installed too! |
No description provided.
The text was updated successfully, but these errors were encountered: