Project

General

Profile

Backport(バックポート) #3928

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

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

Status:
Fixed(完了)
Priority:
Immediate(今すぐ)
Assignee:
Target version:
Start date:
2016-04-07
Due date:
% Done:

100%


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(バグ) #3918: PHP 5.5 以降でプラグインの展開に失敗する Won't fix(対応せず) 2016-03-14

Associated revisions

Revision 18d2a02f (diff)
Added by kaoru n over 3 years ago

updated PEAR::Archive_Tar to 1.4.2 for avoiding error on extracting file with PHP 5.5+ (fixes #3928, refs #3918)

Revision 7cc20f27
Added by Rimpei Ogawa about 3 years ago

Merge pull request #328 from nishizoe/t3928

updated PEAR::Archive_Tar to 1.4.2 for avoiding error on extracting file with PHP 5.5+ (fixes #3928, refs #3918)

History

#1 Updated by kaoru n over 3 years ago

#2 Updated by kaoru n over 3 years ago

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

#3 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/328
プルリクエストを行いました。
レビューをお願いします。

#4 Updated by kaoru n over 3 years ago

  • Target version changed from OpenPNE 3.8.x to OpenPNE 3.8.20

#5 Updated by Rimpei Ogawa about 3 years ago

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

#6 Updated by isao sano about 3 years ago

  • Status changed from Pending Testing(テスト待ち) to Pending Merge(マージ待ち)
  • % Done changed from 70 to 80

単体試験完了しました。
マージお願いします。

#7 Updated by Rimpei Ogawa about 3 years ago

  • Status changed from Pending Merge(マージ待ち) to Fixed(完了)
  • % Done changed from 80 to 100

Also available in: Atom PDF