适用于PHP 5.4版的Magento补丁

use*_*788 5 php patch magento

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

$ sh PATCH_SUPEE-2629_EE_1.12.0.0_v1.sh
Run Code Online (Sandbox Code Playgroud)

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

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
Run Code Online (Sandbox Code Playgroud)

Ole*_*leg 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.
Run Code Online (Sandbox Code Playgroud)

现在,如您所见,它已成功修补,没有任何问题。成功修补后,我再次运行相同的修补程序并得到以下结果:

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
Run Code Online (Sandbox Code Playgroud)

看起来和你那里的非常相似。

尝试运行:

sudo sh YOUR_PATCH.sh --list
Run Code Online (Sandbox Code Playgroud)

查看您的 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
Run Code Online (Sandbox Code Playgroud)

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

sudo sh YOUR_PATCH.sh -R
Run Code Online (Sandbox Code Playgroud)

希望这可以帮助!