Project

General

Profile

Bug(バグ) #3918

PHP 5.5 以降でプラグインの展開に失敗する

Added by kaoru n over 3 years ago. Updated over 2 years ago.

Status:
Won't fix(対応せず)
Priority:
Immediate(今すぐ)
Assignee:
Target version:
Start date:
2016-03-14
Due date:
% Done:

0%

3.6 で発生するか:
Yes (はい)
3.8 で発生するか:
Yes (はい)

Description

Overview (現象)

PHP 5.6 の環境にて opPlugin:install コマンドでプラグインをインストールした際に

could not extract the package.xml file from

というエラーが発生し、インストールが中断します。

PHP 5.6 の場合

PHP 5.6 の場合は、「could not extract the package.xml file from」というエラーが発生し、プラグインのインストールを行うことができません。

% php -v
PHP 5.6.18 (cli) (built: Feb 10 2016 10:19:55)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

% ./symfony opPlugin:install opDiaryPlugin -r 1.5.1
>> sfPearFrontendPlugin Attempting to discover channel "plugins.openpne.jp"...
>> sfPearFrontendPlugin downloading channel.xml ...
>> sfPearFrontendPlugin Starting to download channel.xml (796 bytes)
>> sfPearFrontendPlugin .
>> sfPearFrontendPlugin ...done: 796 bytes
>> sfPearFrontendPlugin Auto-discovered channel "plugins.openpne.jp", alias
>> sfPearFrontendPlugin "plugins.openpne.jp", adding to registry
>> sfPearFrontendPlugin Attempting to discover channel "pear.symfony-project.com"...
>> sfPearFrontendPlugin downloading channel.xml ...
>> sfPearFrontendPlugin Starting to download channel.xml (865 bytes)
>> sfPearFrontendPlugin ...done: 865 bytes
>> sfPearFrontendPlugin Auto-discovered channel "pear.symfony-project.com", alias
>> sfPearFrontendPlugin "symfony", adding to registry
>> sfPearFrontendPlugin Attempting to discover channel
>> sfPearFrontendPlugin "plugins.symfony-project.org"...
>> sfPearFrontendPlugin downloading channel.xml ...
>> sfPearFrontendPlugin Starting to download channel.xml (639 bytes)
>> sfPearFrontendPlugin ...done: 639 bytes
>> sfPearFrontendPlugin Auto-discovered channel "plugins.symfony-project.org", alias
>> sfPearFrontendPlugin "symfony-plugins", adding to registry
>> plugin    installing plugin "opDiaryPlugin" 
>> sfPearFrontendPlugin downloading opDiaryPlugin-1.5.1.tgz ...
>> sfPearFrontendPlugin Starting to download opDiaryPlugin-1.5.1.tgz (78,808 bytes)
>> sfPearFrontendPlugin ...done: 78,808 bytes
>> sfPearFrontendPlugin could not extract the package.xml file from
>> sfPearFrontendPlugin "/OpenPNE3/web/cache/.pear/opDiaryPlugin-1.5.1.tgz" 
>> sfPearFrontendPlugin Download of "http://get.openpne.jp/opDiaryPlugin-1.5.1.tgz" 
>> sfPearFrontendPlugin succeeded, but it is not a valid package archive
>> sfPearFrontendPlugin Invalid or missing remote package file
 Plugin "opDiaryPlugin" installation failed:

% ./symfony opPlugin:install opCommunityTopicPlugin -r 1.0.5
>> plugin    installing plugin "opCommunityTopicPlugin" 
>> sfPearFrontendPlugin downloading opCommunityTopicPlugin-1.0.5.tgz ...
>> sfPearFrontendPlugin Starting to download opCommunityTopicPlugin-1.0.5.tgz (69,561
>> sfPearFrontendPlugin bytes)
>> sfPearFrontendPlugin .
>> sfPearFrontendPlugin .
>> sfPearFrontendPlugin .
>> sfPearFrontendPlugin .
>> sfPearFrontendPlugin .
>> sfPearFrontendPlugin .
>> sfPearFrontendPlugin .
>> sfPearFrontendPlugin .
>> sfPearFrontendPlugin .
>> sfPearFrontendPlugin .
>> sfPearFrontendPlugin .
>> sfPearFrontendPlugin .
>> sfPearFrontendPlugin .
>> sfPearFrontendPlugin .
>> sfPearFrontendPlugin ...done: 69,561 bytes
>> sfPearFrontendPlugin could not extract the package.xml file from
>> sfPearFrontendPlugin "/OpenPNE3/cache/.pear/opCommunityTopicPlugin-1.0.5.tgz" 
>> sfPearFrontendPlugin Download of
>> sfPearFrontendPlugin "http://get.openpne.jp/opCommunityTopicPlugin-1.0.5.tgz" 
>> sfPearFrontendPlugin succeeded, but it is not a valid package archive
>> sfPearFrontendPlugin Invalid or missing remote package file
 Plugin "opCommunityTopicPlugin" installation failed:

PHP 5.4 の場合

PHP 5.4 の場合は、問題なくインストール成功します。

% php -v
PHP 5.4.45 (cli) (built: Feb 10 2016 10:17:56)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies

% ./symfony opPlugin:install opDiaryPlugin -r 1.5.1
>> sfPearFrontendPlugin Attempting to discover channel "plugins.openpne.jp"...
>> sfPearFrontendPlugin downloading channel.xml ...
>> sfPearFrontendPlugin Starting to download channel.xml (796 bytes)
>> sfPearFrontendPlugin .
>> sfPearFrontendPlugin ...done: 796 bytes
>> sfPearFrontendPlugin Auto-discovered channel "plugins.openpne.jp", alias
>> sfPearFrontendPlugin "plugins.openpne.jp", adding to registry
>> sfPearFrontendPlugin Attempting to discover channel "pear.symfony-project.com"...
>> sfPearFrontendPlugin downloading channel.xml ...
>> sfPearFrontendPlugin Starting to download channel.xml (865 bytes)
>> sfPearFrontendPlugin ...done: 865 bytes
>> sfPearFrontendPlugin Auto-discovered channel "pear.symfony-project.com", alias
>> sfPearFrontendPlugin "symfony", adding to registry
>> sfPearFrontendPlugin Attempting to discover channel
>> sfPearFrontendPlugin "plugins.symfony-project.org"...
>> sfPearFrontendPlugin downloading channel.xml ...
>> sfPearFrontendPlugin Starting to download channel.xml (639 bytes)
>> sfPearFrontendPlugin ...done: 639 bytes
>> sfPearFrontendPlugin Auto-discovered channel "plugins.symfony-project.org", alias
>> sfPearFrontendPlugin "symfony-plugins", adding to registry
>> plugin    installing plugin "opDiaryPlugin" 
>> sfPearFrontendPlugin downloading opDiaryPlugin-1.5.1.tgz ...
>> sfPearFrontendPlugin Starting to download opDiaryPlugin-1.5.1.tgz (78,808 bytes)
>> sfPearFrontendPlugin ...done: 78,808 bytes
>> sfPearFrontendPlugin Package "plugins.openpne.jp/opDiaryPlugin" dependency
>> sfPearFrontendPlugin "plugins.openpne.jp/openpne" has no releases
>> opPluginManager Installation successful for plugin "opDiaryPlugin" 
>> opPluginManager Installing web data for plugin
% ./symfony opPlugin:install opCommunityTopicPlugin -r 1.0.5
>> plugin    installing plugin "opCommunityTopicPlugin" 
>> sfPearFrontendPlugin downloading opCommunityTopicPlugin-1.0.5.tgz ...
>> sfPearFrontendPlugin Starting to download opCommunityTopicPlugin-1.0.5.tgz (69,561
>> sfPearFrontendPlugin bytes)
>> sfPearFrontendPlugin .
>> sfPearFrontendPlugin .
>> sfPearFrontendPlugin .
>> sfPearFrontendPlugin .
>> sfPearFrontendPlugin .
>> sfPearFrontendPlugin .
>> sfPearFrontendPlugin .
>> sfPearFrontendPlugin .
>> sfPearFrontendPlugin .
>> sfPearFrontendPlugin .
>> sfPearFrontendPlugin .
>> sfPearFrontendPlugin .
>> sfPearFrontendPlugin .
>> sfPearFrontendPlugin .
>> sfPearFrontendPlugin ...done: 69,561 bytes
>> opPluginManager Installation successful for plugin "opCommunityTopicPlugin" 
>> opPluginManager Installing web data for plugin

PHP 5.5 の場合は未調査

Causes (原因)

PHP 5.5 以降で opPlugin:install が失敗する現象は、PHP が unpack 関数 に対して非互換な変更を行ったことによりプラグインの展開に使用する Archive_Tar が影響を受けたことが原因でした。

Way to fix (修正内容)

Archive_Tar では既にバージョン 1.3.11 にて修正を行っているため、この問題は Archive_Tar を更新することで解決します。
https://github.com/pear/Archive_Tar/commit/de7aade3fbd69f365969c0f34a89d177f94c451a


Related issues

Related to OpenPNE 3 - Bug(バグ) #1908: Installing some plugins were failed with PHP 5.3.4+ (PHP 5.3.4 以上でプラグインの展開に失敗することがある) Fixed(完了) 2011-02-07
Related to OpenPNE 3 - Enhancement(機能追加・改善) #3919: PHP 5.6 対応 Fixed(完了) 2016-03-18 2016-06-09
Related to OpenPNE 3 - Backport(バックポート) #3927: PHP 5.5 以降でプラグインの展開に失敗する Fixed(完了) 2016-04-07
Related to OpenPNE 3 - Backport(バックポート) #3928: PHP 5.5 以降でプラグインの展開に失敗する Fixed(完了) 2016-04-07

History

#1 Updated by kaoru n over 3 years ago

  • Related to Bug(バグ) #1908: Installing some plugins were failed with PHP 5.3.4+ (PHP 5.3.4 以上でプラグインの展開に失敗することがある) added

#2 Updated by kaoru n over 3 years ago

  • Description updated (diff)

#3 Updated by kaoru n over 3 years ago

  • Priority changed from Normal(通常) to Immediate(今すぐ)

#4 Updated by kaoru n over 3 years ago

#5 Updated by Youichi Kimura over 3 years ago

  • Subject changed from PHP 5.6 でプラグインの展開に失敗する to PHP 5.5 以降でプラグインの展開に失敗する

PHP 5.5 以降で opPlugin:install が失敗する現象は、PHP が unpack 関数 に対して非互換な変更を行ったことによりプラグインの展開に使用する Archive_Tar が影響を受けたことが原因でした。

Archive_Tar では既にバージョン 1.3.11 にて修正を行っているため、この問題は Archive_Tar を更新することで解決します。
https://github.com/pear/Archive_Tar/commit/de7aade3fbd69f365969c0f34a89d177f94c451a

#6 Updated by kaoru n over 3 years ago

  • Status changed from New(新規) to Accepted(着手)
  • Assignee set to kaoru n

#7 Updated by kaoru n over 3 years ago

  • Status changed from Accepted(着手) to Pending Review(レビュー待ち)
  • % Done changed from 0 to 50

https://github.com/openpne/OpenPNE3/pull/326
プルリクエストを行いました。
レビューお願いします。

#8 Updated by kaoru n over 3 years ago

  • 3.6 で発生するか changed from Unknown (未調査) to Yes (はい)

#9 Updated by kaoru n over 3 years ago

  • Description updated (diff)

#10 Updated by kaoru n over 3 years ago

#11 Updated by kaoru n over 3 years ago

#12 Updated by Rimpei Ogawa about 3 years ago

  • Status changed from Pending Review(レビュー待ち) to Pending Testing(テスト待ち)
  • % Done changed from 50 to 70

#14 Updated by kaoru n over 2 years ago

  • Status changed from Pending Testing(テスト待ち) to Won't fix(対応せず)
  • Target version changed from OpenPNE 3.9.0-old to OpenPNE 3.9.0
  • % Done changed from 70 to 0

OpenPNE 3.8.20 にて対応済みであったため、対応せずとします。

Also available in: Atom PDF