0

Using terminal in mac, I'm trying to apply patch SUPEE-5344. I've uploaded the patch to the magento root directory, I run the sh script and I'm receiving this:

    Checking if patch can be applied/reverted successfully...
    ERROR: Patch can't be applied/reverted successfully.

    can't find file to patch at input line 5
    Perhaps you used the wrong -p or --strip option?

The text leading up to this was:

    diff --git app/code/core/Mage/Admin/Model/Observer.php app/code/core/Mage/Admin/Model/Observer.php
    index bd00181..6a5281c 100644
    --- app/code/core/Mage/Admin/Model/Observer.php
    +++ app/code/core/Mage/Admin/Model/Observer.php

    File to patch: 
    Skip this patch? [y] 
    Skipping patch.
    3 out of 3 hunks ignored
    can't find file to patch at input line 46
    Perhaps you used the wrong -p or --strip option?

   The text leading up to this was:

    diff --git app/code/core/Mage/Core/Controller/Request/Http.php app/code/core/Mage/Core/Controller/Request/Http.php
    index 6513db9..31eb6d6 100644
    --- app/code/core/Mage/Core/Controller/Request/Http.php
    +++ app/code/core/Mage/Core/Controller/Request/Http.php

    File to patch: 
    Skip this patch? [y] 
    Skipping patch.
    2 out of 2 hunks ignored
    can't find file to patch at input line 91
    Perhaps you used the wrong -p or --strip option?

The text leading up to this was:

    diff --git app/code/core/Mage/Oauth/controllers/Adminhtml/Oauth/AuthorizeController.php app/code/core/Mage/Oauth/controllers/Adminhtml/Oauth/AuthorizeController.php
    index c30d273..36542f9 100644
    --- app/code/core/Mage/Oauth/controllers/Adminhtml/Oauth/AuthorizeController.php
    +++ app/code/core/Mage/Oauth/controllers/Adminhtml/Oauth/AuthorizeController.php

    File to patch: 
    Skip this patch? [y] 
    Skipping patch.
    1 out of 1 hunk ignored
    can't find file to patch at input line 104
    Perhaps you used the wrong -p or --strip option?

The text leading up to this was:

    diff --git app/code/core/Mage/XmlConnect/Model/Observer.php app/code/core/Mage/XmlConnect/Model/Observer.php
    index e6cb947..36142ac 100644
    --- app/code/core/Mage/XmlConnect/Model/Observer.php
    +++ app/code/core/Mage/XmlConnect/Model/Observer.php

    File to patch: 
    Skip this patch? [y] 
    Skipping patch.
    2 out of 2 hunks ignored
    can't find file to patch at input line 126
    Perhaps you used the wrong -p or --strip option?

The text leading up to this was:

    diff --git lib/Varien/Db/Adapter/Pdo/Mysql.php lib/Varien/Db/Adapter/Pdo/Mysql.php
    index 2226331..d1c6942 100644
    --- lib/Varien/Db/Adapter/Pdo/Mysql.php
    +++ lib/Varien/Db/Adapter/Pdo/Mysql.php

    File to patch: 
    Skip this patch? [y] 
    Skipping patch.
    1 out of 1 hunk ignored

Help ASAP please.

  • What version of Magento are you using? Did you download the correct patch for your Magento version? Did you apply any other patches before? – Anna Völkl May 5 '15 at 11:00
  • were you in the magento root directory while executing the patch? does ls app/code/core/Mage/Admin/Model/Observer.php list the Observer.php file? – Flyingmana Jun 20 '15 at 20:28
3

If for all files you see the message "can't find file to patch at input line X", you are probably either

  1. running the patch script in the wrong place: move it to the Magento root directory, cd into it and run the script
  2. not having the right permissions. Try running the script as another user that has access to the Magento source files or use sudo
2

You can find the patches in following the URL to install without SSH https://www.milople.com/blogs/ecommerce/applying-magento-security-patch.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.