0

I have uploaded the patch to my root Magento folder but I get the following error

1 out of 1 hunk FAILED -- saving rejects to file lib/Varien/Db/Adapter/Pdo/Mysql.php.rej

I see this question has been asked and I tried to upload the patched file as described on:

http://magentary.com/kb/apply-supee-5344-and-supee-1533-without-ssh/

but this causes my site to crash.

3
  • What was the error message when applying the patch? Did you maybe do any custom modifications to lib/Varien/Db/Adapter/Pdo/Mysql.php? Check the content of the lib/Varien/Db/Adapter/Pdo/Mysql.php.rej file. Commented May 5, 2015 at 11:02
  • @AnnaVölkl I didn't make any modifications to it and no lib/Varien/Db/Adapter/Pdo/Mysql.php.rej was created. I have looked in the magento directory on the server
    – DaleZA
    Commented May 8, 2015 at 5:41
  • You don't have to make any modifications to the file, just transfer it to the live server in a manner that doesn't properly translate line endings. PHP is line ending agnostic, Linux shell utilities aren't. Commented Jul 11, 2015 at 16:10

2 Answers 2

1

You may refer this https://www.milople.com/blogs/ecommerce/applying-magento-security-patch.html

It works fine.

1
  • You should update your answer and add the most important information from the website here. Just in case the link turns invalid some time. Commented May 8, 2015 at 5:45
1

Patch is used for lots of things other than Magento, here's what causes hunk failures => Error patching Magento, hunk failed => Magento patch installation errors

Often, if you download the Magento installation archive for the exact version you're running from the Magento Downloads Page on the Release Archive tab, extract the file and replace the server file that's giving you the issue, the patch will complete properly.

You can also run the file through dos2unix to correct the line endings as the line endings may be CRLF instead of the LF that Linux and its utilities expects.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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