Bug #72095 [NEW]: Undefined constant GLOB_BRACE while doc-base/configure.php

From: Date: Sun, 24 Apr 2016 13:44:28 +0000
Subject: Bug #72095 [NEW]: Undefined constant GLOB_BRACE while doc-base/configure.php
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-13425@lists.php.net to get a copy of this message
From: rogeriopradoj@php.net Operating system: Alpine Linux PHP version: Irrelevant Package: Doc Build problem Bug Type: Bug Bug description:Undefined constant GLOB_BRACE while doc-base/configure.php Description: ------------ When running doc-base/configure.php (as pointed in http://doc.php.net/tutorial/editing.php) for any language (en or translations), in Alpine Linux, 3 error messages are thrown, 1 notice and 2 warnings: --- $ php doc-base/configure.php --enable-xml-details Iterating over extension specific version files... PHP Notice: Use of undefined constant GLOB_BRACE - assumed 'GLOB_BRACE' in /php-manual/doc-base/configure.php on line 573 PHP Warning: glob() expects parameter 2 to be long, string given in /php-manual/doc-base/configure.php on line 573 PHP Warning: Invalid argument supplied for foreach() in /php-manual/doc-base/configure.php on line 573 --- The message "All good. Saving .manual.xml… done." is shown in the end, anyway we could make these errors disappear. Researching a little I found that this happens in Alpine Linux because seems that it doesn't support GLOB_BRACE since it is using musl libc instead of GNU libc. > https://github.com/zendframework/zend-stdlib/issues/58 The workaround is not hard to implement (https://github.com/zendframework/zend-stdlib/pull/59): Instead of using directly ... GLOB_BRACE ... it's just to check if it's defined before otherwise defaults to 0, like this: ... defined('GLOB_BRACE') ? GLOB_BRACE : 0 ... As shown above, it's the way the issue was solved in Zend Framework. --- As Alpine Linux is going to get more attention mainly because of Docker based environments because it's very lightweight (https://www.brianchristner.io/docker-is-moving-to-alpine-linux/), I guess this workaround proposed is worth to have here as well. -- Edit bug report at https://bugs.php.net/bug.php?id=72095&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=72095&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=72095&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=72095&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=72095&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=72095&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=72095&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=72095&r=needscript Try newer version: https://bugs.php.net/fix.php?id=72095&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=72095&r=support Expected behavior: https://bugs.php.net/fix.php?id=72095&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=72095&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=72095&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=72095&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72095&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=72095&r=dst IIS Stability: https://bugs.php.net/fix.php?id=72095&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=72095&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=72095&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=72095&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=72095&r=mysqlcfg

« previous php.doc.bugs (#13425) next »