从以下位置下载并运行 Magento PHP 5.4 支持补丁 (Magento-CE-v1.7.0.0-1.7.0.2) 时http://www.magentocommerce.com/download http://www.magentocommerce.com/download,使用运行脚本sh PATCH_SUPEE-2629_EE_1.12.0.0_v1.sh
我们收到此错误:
$ sh PATCH_SUPEE-2629_EE_1.12.0.0_v1.sh
: command not found_1.12.0.0_v1.sh: line 7:
'ATCH_SUPEE-2629_EE_1.12.0.0_v1.sh: line 9: syntax error near unexpected token `{
'ATCH_SUPEE-2629_EE_1.12.0.0_v1.sh: line 9: `_check_installed_tools() {
奇怪的是,脚本的第 7 行是空白的(这是文件的头部):
#!/bin/bash
# Patch apllying tool template
# v0.1.2
# (c) Copyright 2013. Magento Inc.
#
# DO NOT CHANGE ANY LINE IN THIS FILE.
# 1. Check required system tools
_check_installed_tools() {
local missed=""
我们尝试在 Windows 和 Mac、Firefox 和 Chrome 中进行下载,以排除下载过程中引起的任何编码问题。这个补丁看起来很新——Added Jan 17, 2014
我们正在运行 Magento 社区版 1.7.0.2
Edit
我们尝试运行 .sh 文件bash
以及但收到相同的响应。
有趣的是,当单击“下载”时,Magento 在浏览器中显示 .sh 源代码,因此我们尝试了查看源代码的各种组合,然后保存;从浏览器窗口复制文本并将其保存到文本文件。尽管其中一个将错误消息更改为:
$ sh PATCH_SUPEE-2629_EE_1.12.0.0_v1.sh
Checking if patch can be applied/reverted successfully...
/usr/bin/patch: **** malformed patch at line 238:
ERROR: Patch can't be applied/reverted successfully.
第238行是这里的空白注释行:
+/**
+ * Abstract helper class for {@link Zend_Pdf_FileParser} that provides the
+ * data source for parsing.
+ *
+ * Concrete subclasses allow for parsing of in-memory, filesystem, and other
+ * sources through a common API. These subclasses also take care of error
+ * handling and other mundane tasks.
我们还尝试了这里提到的 VI 步骤 - :set ff unixhttp://www.magentocommerce.com/boards/viewthread/864518 http://www.magentocommerce.com/boards/viewthread/864518
然后错误改为:
$ sh PATCH_SUPEE-2629_EE_1.12.0.0_v1.sh
Checking if patch can be applied/reverted successfully...
ERROR: Patch can't be applied/reverted successfully.
patching file app/code/core/Mage/Catalog/Model/Product.php
Hunk #1 FAILED at 1936.
1 out of 1 hunk FAILED -- saving rejects to file app/code/core/Mage/Catalog/Model/Product.php.rej
patching file app/code/core/Mage/Core/Controller/Varien/Router/Standard.php
Hunk #1 FAILED at 43.
1 out of 1 hunk FAILED -- saving rejects to file app/code/core/Mage/Core/Controller/Varien/Router/Standard.php.rej
patching file app/code/core/Mage/Install/etc/config.xml
patching file app/code/core/Zend/Pdf/FileParserDataSource.php