Bug #52258 [Opn->Fbk]: Fails to compile phar with LC_CTYPE=tr_TR.UTF-8
| From: | mike@php.net | Date: | Mon, 30 Mar 2015 18:59:11 +0000 |
| Subject: | Bug #52258 [Opn->Fbk]: Fails to compile phar with LC_CTYPE=tr_TR.UTF-8 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-191738@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=52258&edit=1
ID: 52258
Updated by: mike@php.net
Reported by: mabi at gentoo dot org
Summary: Fails to compile phar with LC_CTYPE=tr_TR.UTF-8
-Status: Open
+Status: Feedback
Type: Bug
Package: PHAR related
Operating System: Gentoo Linux
PHP Version: 5.3.2
Block user comment: N
Private report: N
New Comment:
Please try using this snapshot:
http://snaps.php.net/php5.5-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
Previous Comments:
------------------------------------------------------------------------
[2011-02-09 03:13:17] cankoy at ymail dot com
This is the infamous bug http://bugs.php.net/bug.php?id=18556
Any name that's allowed to be case insensitive and have letter I suffers from this issue.
------------------------------------------------------------------------
[2010-10-24 18:08:36] mabi at gentoo dot org
Code's unchanged in 5.3.3
------------------------------------------------------------------------
[2010-07-06 01:39:45] mabi at gentoo dot org
Description:
------------
This is from http://bugs.gentoo.org/show_bug.cgi?id=327049:
php-5.3.2 fails to compile the phar extension when using tr_TR.UTF-8 as a locale. When using LANG=C
everything's fine.
Do we need to enforce a particular LANG or is this considered a bug in php/phar?
Expected result:
----------------
Compiles && installs
Actual result:
--------------
Generating phar.php
Generating phar.phar
Parse error: syntax error, unexpected '/', expecting ')' in
/var/tmp/portage/dev-lang/php-5.3.2/work/php-5.3.2/ext/phar/phar.php on line 20
make: *** [ext/phar/phar.phar] Error 255
phar.php:
17 if (!class_exists('DirectoryTreeIterator', 0))
18 {
19
20 Warning:
file(/var/tmp/portage/dev-lang/php-5.3.2/work/php-5.3.2/ext/phar/phar/directorytreeIterator.inc):
failed to open stream: No such file or directory in
/var/tmp/portage/dev-lang/php-5.3.2/work/php-5.3.2/ext/phar/build_precommand.php
on line 31
21
22 Warning: join(): Invalid arguments passed in
/var/tmp/portage/dev-lang/php-5.3.2/work/php-5.3.2/ext/phar/build_precommand.php
on line 49
23
24 }
build_precommand.php:
21 $classes = array(
22 'DirectoryTreeIterator',
23 'DirectoryGraphIterator',
24 'InvertedRegexIterator',
25 'CLICommand',
26 'PharCommand',
27 );
28
29 foreach($classes as $name) {
30 echo "if (!class_exists('$name', 0))\n{\n";
31 $f = file(dirname(__FILE__) . '/phar/' . strtolower($name) .
'.inc');
This assumes that strtolower('DirectoryTreeIterator') is
'directorytreeiterator', which is not true in a Turkish locale
(LC_CTYPE=tr_TR.UTF-8).
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=52258&edit=1