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
PHP on Alpine gives Warning: Use of undefined constant GLOB_BRACE
#719
Comments
Warning: Use of undefined constant GLOB_BRACE
Similar wp-cli/wp-cli#4353 (comment) |
The manual states
Alpine ships with musl libc which is MIT and not GNU. |
That's a bummer -- looks like there's nothing we can do here except recommend that if you require this constant, you need to switch to the Debian-based images off Alpine. |
zend-stdlib has a fallback wrapper \Zend\Stdlib\Glob::glob($pattern, $flags = 0, $forceFallback = false) It can be installed with composer composer require zendframework/zend-stdlib |
+1 for @hairmare's solution - it works! I was building docker php container FROM php-7.0-fpm-alpine and trying to bin/magento setup:upgrade when I ran into the error: [Exception] In my instance, my version of Magento (2.1.8) required using |
如 PHP docker (Alpine) docker-library/php#719
what docker image can you recommended? |
If you're using For further help, I'd suggest the Docker Community Forums, the Docker Community Slack, or Stack Overflow. |
Steps to reproduce:
docker run --rm -it php:alpine php -r 'var_dump(GLOB_BRACE);'
Expected result
Actual result
This is an Alpine-specific issue.
docker run --rm -it php:stretch php -r 'var_dump(GLOB_BRACE);'
produces the expected result.The text was updated successfully, but these errors were encountered: