适用于PHP 5.4版的Magento补丁

时间:2014-01-27 00:45:11

标签: php magento patch

在应用Magento PATCH for Php 5.4最新版本时,任何人都会遇到此错误

$ sh PATCH_SUPEE-2629_EE_1.12.0.0_v1.sh

我也试过这个指令,但它对我不起作用:

http://www.magentocommerce.com/knowledge-base/entry/apply-revert-magento-patches?icid=BLOG_php54_knowledgebase

PATCH_SUPEE-2629_EE_1.12.0.0_v1.sh: 14: PATCH_SUPEE-2629_EE_1.12.0.0_v1.sh: 127: not found
PATCH_SUPEE-2629_EE_1.12.0.0_v1.sh: 14: PATCH_SUPEE-2629_EE_1.12.0.0_v1.sh: 127: not found
PATCH_SUPEE-2629_EE_1.12.0.0_v1.sh: 25: PATCH_SUPEE-2629_EE_1.12.0.0_v1.sh: 0: not found
Checking if patch can be applied/reverted successfully...
-e ERROR: Patch can't be applied/reverted successfully.

patching file app/code/core/Mage/Catalog/Model/Product.php

Reversed (or previously applied) patch detected!  Assume -R? [n] 

Apply anyway? [n] 

Skipping patch.

1 out of 1 hunk ignored -- 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

Reversed (or previously applied) patch detected!  Assume -R? [n] 

Apply anyway? [n] 

Skipping patch.

1 out of 1 hunk ignored -- 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

Reversed (or previously applied) patch detected!  Assume -R? [n] 

Apply anyway? [n] 

Skipping patch.

1 out of 1 hunk ignored -- saving rejects to file app/code/core/Mage/Install/etc/config.xml.rej

The next patch would create the file app/code/core/Zend/Pdf/FileParserDataSource.php,
which already exists!  Assume -R? [n] 

Apply anyway? [n] 

Skipping patch.

1 out of 1 hunk ignored

1 个答案:

答案 0 :(得分:4)

您看到特定响应的原因是(最有可能)补丁已经应用。

我在干净的Magento安装上运行了一个快速补丁:

oleg@sandbox:~/www/magento_enterprise$ sudo sh PATCH_SUPEE-2619_EE_1.13.1.0_v1-2014-01-21-05-52-03.sh
PATCH_SUPEE-2619_EE_1.13.1.0_v1-2014-01-21-05-52-03.sh: 14: PATCH_SUPEE-2619_EE_1.13.1.0_v1-2014-01-21-05-52-03.sh: 127: not found
PATCH_SUPEE-2619_EE_1.13.1.0_v1-2014-01-21-05-52-03.sh: 14: PATCH_SUPEE-2619_EE_1.13.1.0_v1-2014-01-21-05-52-03.sh: 127: not found
PATCH_SUPEE-2619_EE_1.13.1.0_v1-2014-01-21-05-52-03.sh: 25: PATCH_SUPEE-2619_EE_1.13.1.0_v1-2014-01-21-05-52-03.sh: 0: not found
Checking if patch can be applied/reverted successfully...
Patch was applied/reverted successfully.

现在,您可以看到它成功修补而没有任何问题。在成功的补丁之后,我再次运行相同的补丁并得到了这个:

oleg@sandbox:~/www/magento_enterprise$ sudo sh PATCH_SUPEE-2619_EE_1.13.1.0_v1-2014-01-21-05-52-03.sh
PATCH_SUPEE-2619_EE_1.13.1.0_v1-2014-01-21-05-52-03.sh: 14: PATCH_SUPEE-2619_EE_1.13.1.0_v1-2014-01-21-05-52-03.sh: 127: not found
PATCH_SUPEE-2619_EE_1.13.1.0_v1-2014-01-21-05-52-03.sh: 14: PATCH_SUPEE-2619_EE_1.13.1.0_v1-2014-01-21-05-52-03.sh: 127: not found
PATCH_SUPEE-2619_EE_1.13.1.0_v1-2014-01-21-05-52-03.sh: 25: PATCH_SUPEE-2619_EE_1.13.1.0_v1-2014-01-21-05-52-03.sh: 0: not found
Checking if patch can be applied/reverted successfully...
-e ERROR: Patch can't be applied/reverted successfully.

patching file app/code/core/Mage/Catalog/Model/Product.php
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- 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
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file app/code/core/Mage/Core/Controller/Varien/Router/Standard.php.rej
The next patch would create the file app/code/core/Zend/Pdf/FileParserDataSource.php,
which already exists!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored

看起来与你的相似。

尝试跑步:

sudo sh YOUR_PATCH.sh --list

查看Magento安装中已应用的修补程序,以确认您的修补程序是否已应用。

应用上述补丁后的输出是:

oleg@sandbox:~/www/magento_enterprise$ sudo sh PATCH_SUPEE-2619_EE_1.13.1.0_v1-2014-01-21-05-52-03.sh --list
PATCH_SUPEE-2619_EE_1.13.1.0_v1-2014-01-21-05-52-03.sh: 14: PATCH_SUPEE-2619_EE_1.13.1.0_v1-2014-01-21-05-52-03.sh: 127: not found
PATCH_SUPEE-2619_EE_1.13.1.0_v1-2014-01-21-05-52-03.sh: 14: PATCH_SUPEE-2619_EE_1.13.1.0_v1-2014-01-21-05-52-03.sh: 127: not found
PATCH_SUPEE-2619_EE_1.13.1.0_v1-2014-01-21-05-52-03.sh: 25: PATCH_SUPEE-2619_EE_1.13.1.0_v1-2014-01-21-05-52-03.sh: 0: not found
-e Applied/reverted patches list:
-e 2014-02-07 23:29:18 UTC | SUPEE-2619 | EE_1.13.1.0 | v1 | d0a215a139aa5e75d60e42efa1b2661d84fef2be | Tue Dec 10 17:41:31 2013 +0200 | v1.13.1.0..HEAD
-e 2014-02-12 10:24:33 UTC | SUPEE-2619 | EE_1.13.1.0 | v1 | d0a215a139aa5e75d60e42efa1b2661d84fef2be | Tue Dec 10 17:41:31 2013 +0200 | v1.13.1.0..HEAD | REVERTED

您还可以恢复补丁并再次尝试重新安装Magento。要恢复补丁运行:

sudo sh YOUR_PATCH.sh -R

希望这有帮助!