Reputation: 37
I have this patch in Magento which is patch.sh
and I want to run this file and execute it. I logged in and tried to install using SSH way. I'm using PUTTY. When I run the patch.sh
file I encountered an error, and I don't know how to fix it. Here is the error message:
ERROR: Patch can't be applied/reverted successfully.
patching file app/code/core/Mage/Admin/Model/Observer.php
Hunk #1 FAILED at 44.
Hunk #2 FAILED at 62.
Hunk #3 FAILED at 73.
3 out of 3 hunks FAILED -- saving rejects to file app/code/core/Mage/Admin/Model/Observer.php.rej
patching file app/code/core/Mage/Core/Controller/Request/Http.php
Hunk #1 FAILED at 76.
Hunk #2 FAILED at 541.
2 out of 2 hunks FAILED -- saving rejects to file app/code/core/Mage/Core/Controller/Request/Http.php.rej
patching file app/code/core/Mage/Oauth/controllers/Adminhtml/Oauth/AuthorizeController.php
Hunk #1 FAILED at 55.
1 out of 1 hunk FAILED -- saving rejects to file app/code/core/Mage/Oauth/controllers/Adminhtml/Oauth/AuthorizeController.php.rej
patching file app/code/core/Mage/XmlConnect/Model/Observer.php
Hunk #1 FAILED at 143.
Hunk #2 FAILED at 160.
2 out of 2 hunks FAILED -- saving rejects to file app/code/core/Mage/XmlConnect/Model/Observer.php.rej
patching file lib/Varien/Db/Adapter/Pdo/Mysql.php
Hunk #1 FAILED at 2834.
1 out of 1 hunk FAILED -- saving rejects to file lib/Varien/Db/Adapter/Pdo/Mysql.php.rej
How should I fix it or where should I start to debug the problem?
Upvotes: 0
Views: 2573
Reputation: 143
Either your Magento installation is already patched, or you have modifications in core files (app/code/core/Mage/Admin/Model/Observer.php for example and so on). The solution is to compare your current files with original files from Magento distribution and understand why your files got changed. If you believe there should be no any changes in core files, you can simply replace app/code/core/Mage/Admin/Model/Observer.php, app/code/core/Mage/Core/Controller/Request/Http.php and so on with original files from corresponding Magento distribution and re-run the patch.
Upvotes: 1
Reputation: 318
Try on your /var/www magento root
rm -rf var/cache var/session
chmod 550 ./mage
./mage mage-setup .
Upvotes: 0