アップデートで「パッケージをダウンロード中にエラーが発生しました。」

2014年9月17日 at 10:58

テスト環境の concrete5 をアップデートしようとし、エラーに遭遇しております。

index.php/dashboard/system/backup_restore/update/ にて「ダウンロード」ボタンを押下すると、下記エラーが表示されます。

パッケージをダウンロード中にエラーが発生しました。


PHP はある程度分かるので、ログなど見られれば、原因追跡できるかもしれません。
(index.php/dashboard/reports/logs/ には、出ていません。PHP のエラーログも出ていません。)

-- 以下環境情報です
# concrete5 バージョン
5.5.2.1

# concrete5 パッケージ
Pluralism (1.1), Squarely Theme (1.0), Yosemite (1.0).

# concrete5 オーバーライド
blocks/content, blocks/index.html, controllers/index.html, elements/index.html, helpers/index.html, jobs/index.html, js/index.html, css/index.html, languages/ja_JP.UTF8, libraries/index.html, mail/index.html, models/index.html, single_pages/index.html, themes/index.html, tools/index.html

# サーバーソフトウェア
Apache/2.2

# サーバーAPI
apache2handler

# PHPバージョン
5.2.17

# PHP エクステンション
apache2handler, ctype, curl, date, dom, exif, filter, ftp, gd, gettext, iconv, libxml, mbstring, mcrypt, mhash, mysql, mysqli, namazu, openssl, pcre, PDO, pdo_pgsql, pgsql, Reflection, session, SimpleXML, SPL, standard, xml, xmlreader, zip, zlib.

# PHP 設定
log_errors_max_len - 1024
max_execution_time - 5
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
memory_limit - 64M
post_max_size - 8M
safe_mode - Off
safe_mode_exec_dir - no value
safe_mode_gid - Off
safe_mode_include_dir - /home/vhosts_manager/php_inc/
sql.safe_mode - Off
suhosin.log.phpscript.is_safe - Off
upload_max_filesize - 2M
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
pcre.backtrack_limit - 100000
pcre.recursion_limit - 100000
pgsql.max_links - Unlimited
pgsql.max_persistent - Unlimited
session.cache_limiter - nocache
session.gc_maxlifetime - 7200
safe_mode_allowed_env_vars - PHP_
safe_mode_protected_env_vars - LD_LIBRARY_PATH

※ allow_url_fopen on です。
※ updates/ は 777 にしています。

タグ:

Re: アップデートで「パッケージをダウンロード中にエラーが発生しました。」

2014年9月17日 at 11:59
file_get_contents関数でアップグレードパッケージの取得に失敗していると思います。サーバー設定を見直すか、手動ダウンロードにてアップグレードを行なってください。
http://concrete5-japan.org/help/install/how_to_upgrade/
 

Re: アップデートで「パッケージをダウンロード中にエラーが発生しました。」

2014年9月17日 at 13:44
情報ありがとうございます。

手動で対応する方法は以前に試したことがあるのですが、今回はWEB からの動作を試したいと考えております。(本番運用ではなく、開発環境で concrete5 を評価している段階です。)

file_get_contents で grep すると、相当な数が引っかかる状況なのですが、どのファイルで行っているかなど、分かりましたら情報をいただけましたら幸いです。
 

Re: アップデートで「パッケージをダウンロード中にエラーが発生しました。」

2014年9月18日 at 3:05
concrete/core/helper/file.php

Concrete5_Helper_File::getContents()
です
 

Re: アップデートで「パッケージをダウンロード中にエラーが発生しました。」

2014年10月7日 at 10:02
度々情報ありがとうございます。

バージョンの違いなのか、若干異なる場所でしたが、該当する処理がありました。
concrete/helpers/file.php
FileHelper#getContents

$contents = @file_get_contents($file, 0, $ctx)
は、String(0) "" でした。

$contents = curl_exec($curl_handle);
も同じくなのですが、
$http_code = curl_getinfo($curl_handle, CURLINFO_HTTP_CODE);
が「301」でした・・・

かなり強引ですが、1行目に
$file = 'http://concrete5-japan.org/files/2514/0000/6396/concrete5.6.3.1.ja_updater.zip';
と、書いたら、ダウンロード・アップデートに成功しました。

ということで、当方環境では、リダイレクトを適切に処理できないようでした。
PHP が「with Suhosin-Patch 0.9.7」な環境なので、この辺りですかね。
 

Re: アップデートで「パッケージをダウンロード中にエラーが発生しました。」

2014年10月3日 at 0:10
concrete5もありがとうございます!!!
驚きましたー!
 

Re: アップデートで「パッケージをダウンロード中にエラーが発生しました。」

2014年10月10日 at 12:18
どうも。お世話様です。

concrete5.3.1.1.ja あたりから試し、concrete5.3.3.1.ja あたりから実運用でも使わせて頂いております。

3サイトに導入しておりますが、デザイナーやオーナー様が標準機能で満足されているのか、カスタマイズの依頼が皆無でして。。。 全く、勉強できていません。