Skip to content
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

How to enable mhash #439

Closed
gpsa opened this issue May 23, 2017 · 2 comments
Closed

How to enable mhash #439

gpsa opened this issue May 23, 2017 · 2 comments
Labels
question Usability question, not directly related to an error with the image

Comments

@gpsa
Copy link

gpsa commented May 23, 2017

I already enabled hash extension on php:5.6-apache image and installed libmhash-dev, but it doesn't enable mhash.
In PHP doc. page:

As of PHP 5.3.0, the mhash extension is emulated thru the Hash extension. This makes the mhash installation directory have no effect, and requires the hash extension enabled to make the mhash support available.

But even though it doesn't enable mhash functions

@tianon
Copy link
Member

tianon commented Dec 23, 2017

Sorry for the delay!

It would appear that PHP includes --enable-hash by default, but that does not include --with-mhash by default, and it's very difficult to get it working after-the-fact. The closest I got was by installing libmhash-dev, and using docker-php-ext-configure hash --with-mhash=/usr followed by docker-php-ext-install hash, but then it doesn't get enabled because it's already enabled in the core by default (and PHP won't load it a second time).

I think we either need to bake --with-mhash into the image itself (which I'm not too fond of), or use --disable-hash so that it can be compiled and installed successfully after-the-fact instead (which is the solution I'd be more partial to, although it obviously requires testing to ensure that my proposed solution actually works).

@tianon
Copy link
Member

tianon commented Apr 19, 2018

Finally got around to testing this, and --disable-hash allowed me to successfully do docker-php-ext-configure hash --with-mhash followed by docker-php-ext-install hash. 👍

See #627. 🤘

@wglambert wglambert added the question Usability question, not directly related to an error with the image label Apr 25, 2018
mekras added a commit to dobrosite/docker-php that referenced this issue May 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Usability question, not directly related to an error with the image
Projects
None yet
Development

No branches or pull requests

3 participants