|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52258 Fails to compile phar with LC_CTYPE=tr_TR.UTF-8
Submitted: 2010-07-06 01:39 UTC Modified: 2015-04-12 04:22 UTC
Avg. Score:3.4 ± 1.3
Reproduced:4 of 4 (100.0%)
Same Version:2 (50.0%)
Same OS:2 (50.0%)
From: mabi at gentoo dot org Assigned:
Status: No Feedback Package: PHAR related
PHP Version: 5.3.2 OS: Gentoo Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: mabi at gentoo dot org
New email:
PHP Version: OS:


 [2010-07-06 01:39 UTC] mabi at gentoo dot org
This is from
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

    17  if (!class_exists('DirectoryTreeIterator', 0))
    18  {
    20  Warning:
failed to open stream: No such file or directory in
on line 31
    22  Warning: join(): Invalid arguments passed in
on line 49
    24  }

    21  $classes = array(
    22          'DirectoryTreeIterator',
    23          'DirectoryGraphIterator',
    24          'InvertedRegexIterator',
    25          'CLICommand',
    26          'PharCommand',
    27          );
    29  foreach($classes as $name) {
    30          echo "if (!class_exists('$name', 0))\n{\n";
    31          $f = file(dirname(__FILE__) . '/phar/' . strtolower($name) .

This assumes that strtolower('DirectoryTreeIterator') is
'directorytreeiterator', which is not true in a Turkish locale


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-10-24 18:08 UTC] mabi at gentoo dot org
Code's unchanged in 5.3.3
 [2010-12-03 17:38 UTC]
-Package: Compile Failure +Package: PHAR related
 [2011-02-09 03:13 UTC] cankoy at ymail dot com
This is the infamous bug
Any name that's allowed to be case insensitive and have letter I suffers from this issue.
 [2015-03-30 18:59 UTC]
-Status: Open +Status: Feedback
 [2015-03-30 18:59 UTC]
Please try using this snapshot:
For Windows:

 [2015-04-12 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Dec 06 15:03:34 2021 UTC