php.net |  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
Votes:9
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
Have you experienced this issue?
Rate the importance of this bug to you:

 [2010-07-06 01:39 UTC] 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).


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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] jani@php.net
-Package: Compile Failure +Package: PHAR related
 [2011-02-09 03:13 UTC] 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.
 [2015-03-30 18:59 UTC] mike@php.net
-Status: Open +Status: Feedback
 [2015-03-30 18:59 UTC] mike@php.net
Please try using this snapshot:

  http://snaps.php.net/php5.5-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [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-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 19:01:30 2024 UTC