0

I have applied all patches and also updated my .htaccess.sample to a stock magento file but the patch is not going successfully. I got this code.

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

            patching file .htaccess
            Hunk #1 FAILED at 207.
            1 out of 1 hunk FAILED -- saving rejects to file .htaccess.rej
            patching file .htaccess.sample
            patching file app/code/core/Mage/Admin/Model/Block.php
            patching file app/code/core/Mage/Admin/Model/Resource/Block.php
            patching file app/code/core/Mage/Admin/Model/Resource/Block/Collection.php
            patching file app/code/core/Mage/Admin/Model/Resource/Variable.php
            patching file app/code/core/Mage/Admin/Model/Resource/Variable/Collection.php
            patching file app/code/core/Mage/Admin/Model/Variable.php
            patching file app/code/core/Mage/Admin/etc/config.xml
            patching file app/code/core/Mage/Admin/sql/admin_setup/upgrade-1.6.1.1-1.6.1.2.php
            patching file app/code/core/Mage/Adminhtml/Block/Permissions/Block.php
            patching file app/code/core/Mage/Adminhtml/Block/Permissions/Block/Edit.php
            patching file app/code/core/Mage/Adminhtml/Block/Permissions/Block/Edit/Form.php
            patching file app/code/core/Mage/Adminhtml/Block/Permissions/Block/Grid.php
            patching file app/code/core/Mage/Adminhtml/Block/Permissions/Variable.php
            patching file app/code/core/Mage/Adminhtml/Block/Permissions/Variable/Edit.php
            patching file app/code/core/Mage/Adminhtml/Block/Permissions/Variable/Edit/Form.php
            patching file app/code/core/Mage/Adminhtml/Block/Permissions/Variable/Grid.php
            patching file app/code/core/Mage/Adminhtml/controllers/Permissions/BlockController.php
            patching file app/code/core/Mage/Adminhtml/controllers/Permissions/VariableController.php
            patching file app/code/core/Mage/Adminhtml/etc/adminhtml.xml
            patching file app/code/core/Mage/Catalog/Model/Product/Option/Type/File.php
            patching file app/code/core/Mage/Core/Controller/Request/Http.php
            patching file app/code/core/Mage/Core/Controller/Varien/Router/Admin.php
            patching file app/code/core/Mage/Core/Helper/UnserializeArray.php
            patching file app/code/core/Mage/Core/Model/Email/Template/Filter.php
            patching file app/code/core/Mage/Core/Model/Resource/Setup.php
            patching file app/code/core/Mage/Core/etc/config.xml
            patching file app/code/core/Mage/Core/etc/system.xml
            patching file app/code/core/Mage/Customer/Block/Account/Changeforgotten.php
            patching file app/code/core/Mage/Customer/Block/Account/Resetpassword.php
            patching file app/code/core/Mage/Customer/controllers/AccountController.php
            patching file app/code/core/Mage/Downloadable/Model/Product/Type.php
            patching file app/code/core/Mage/Eav/Model/Resource/Attribute/Collection.php
            patching file app/code/core/Mage/Sales/Model/Resource/Order/Item/Collection.php
            patching file app/code/core/Mage/Sales/controllers/DownloadController.php
            patching file app/code/core/Mage/SalesRule/Model/Resource/Coupon/Collection.php
            patching file app/code/core/Zend/XmlRpc/Request.php
            patching file app/code/core/Zend/XmlRpc/Response.php
            patching file app/design/adminhtml/default/default/layout/admin.xml
            patching file app/design/frontend/base/default/layout/customer.xml
            patching file app/design/frontend/base/default/template/customer/form/register.phtml
            patching file app/design/frontend/base/default/template/customer/form/resetforgottenpassword.phtml
            patching file app/design/frontend/base/default/template/page/js/cookie.phtml
            patching file app/design/frontend/base/default/template/persistent/customer/form/register.phtml
            patching file app/design/frontend/default/iphone/layout/customer.xml
            patching file app/design/frontend/default/modern/layout/customer.xml
            patching file app/design/frontend/rwd/default/layout/customer.xml
            patching file app/design/frontend/rwd/default/template/customer/form/resetforgottenpassword.phtml
            patching file app/design/frontend/rwd/default/template/persistent/customer/form/register.phtml
            patching file cron.php
            patching file errors/processor.php
            patching file lib/Unserialize/Parser.php
            patching file lib/Unserialize/Reader/Arr.php
            patching file lib/Unserialize/Reader/ArrKey.php
            patching file lib/Unserialize/Reader/ArrValue.php
            patching file lib/Unserialize/Reader/Bool.php
            patching file lib/Unserialize/Reader/Dbl.php
            patching file lib/Unserialize/Reader/Int.php
            patching file lib/Unserialize/Reader/Str.php
            patching file lib/Varien/Data/Collection/Db.php
            patching file lib/Zend/Xml/Security.php
            patch unexpectedly ends in middle of line
            Hunk #4 FAILED at 153.
            1 out of 4 hunks FAILED -- saving rejects to file lib/Zend/Xml/Security.php.rej
0

sent you an email with the .htaccess and sample file. As for the rest:

I'm not sure about those other files (lib/Unserialize) you get the error on now.. perhaps try removing them since the patch is attempting to create them. For lib/Varien/Data/Collection/Db.php back it up and try to replace with stock file since it appears to be edited.

  • Hi Anja, thanks!!! Inserting the htaccess files made the patch installed successfully. Now some layouts are missing. How can fix them? – Jahswey Nov 24 '15 at 10:30
  • the patch made it so all blocks need to be whitelisted. this guy made a toolbox which can automatically find all blocks you use and add them to the whitelist github.com/rhoerr/supee-6788-toolbox . otherwise you can insert them manually via System > Permissions > Blocks – Robin Nov 24 '15 at 10:43
  • Since I used an older htaccess files, what happens to the previous patches 6285, 6482 etc. Do I need to re add them or they are no longer necessary? Also I scanned my site on magereport but its says SUPEE 6788 isn't installed any worries? – Jahswey Nov 24 '15 at 11:12
  • after patching you can replace the .htaccess file with your own (older) .htaccess file, and just add ########################################### ## Deny access to cron.php <Files cron.php> ############################################ Order allow,deny Deny from all </Files> since that's the only change it made to the .htaccess file – Robin Nov 24 '15 at 11:17
  • hm that didn't output well. I don't think you need to repatch the other patches. also I dunno why magereport says the patch isn't installed, it should say it's there – Robin Nov 24 '15 at 11:18
1

Make a backup of .htaccess and lib/Zend/Xml/Security.php and change these files with originals that you can find in the release archive (https://www.magentocommerce.com/download), choosing your magento version. Apply again the patch :-)

  • Don't forget to manually apply any patches to the files you backup since there might be customizations in there. – dvdmierden Nov 24 '15 at 8:54
0

Check that you have applied all previous security patches as some of them change the same files and the newer patches expect that version.

0

Hi @serman I did as you said now I have this error message. I checked magereport but it still says patch not installed.

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

            patching file .htaccess
            Reversed (or previously applied) patch detected!  Assume -R? [n]
            Apply anyway? [n]
            Skipping patch.
            1 out of 1 hunk ignored -- saving rejects to file .htaccess.rej
            patching file .htaccess.sample
            Reversed (or previously applied) patch detected!  Assume -R? [n]
            Apply anyway? [n]
            Skipping patch.
            1 out of 1 hunk ignored -- saving rejects to file .htaccess.sample.rej
            patching file app/code/core/Mage/Admin/Model/Block.php
            patching file app/code/core/Mage/Admin/Model/Resource/Block.php
            patching file app/code/core/Mage/Admin/Model/Resource/Block/Collection.php
            patching file app/code/core/Mage/Admin/Model/Resource/Variable.php
            patching file app/code/core/Mage/Admin/Model/Resource/Variable/Collection.php
            patching file app/code/core/Mage/Admin/Model/Variable.php
            patching file app/code/core/Mage/Admin/etc/config.xml
            patching file app/code/core/Mage/Admin/sql/admin_setup/upgrade-1.6.1.1-1.6.1.2.php
            patching file app/code/core/Mage/Adminhtml/Block/Permissions/Block.php
            patching file app/code/core/Mage/Adminhtml/Block/Permissions/Block/Edit.php
            patching file app/code/core/Mage/Adminhtml/Block/Permissions/Block/Edit/Form.php
            patching file app/code/core/Mage/Adminhtml/Block/Permissions/Block/Grid.php
            patching file app/code/core/Mage/Adminhtml/Block/Permissions/Variable.php
            patching file app/code/core/Mage/Adminhtml/Block/Permissions/Variable/Edit.php
            patching file app/code/core/Mage/Adminhtml/Block/Permissions/Variable/Edit/Form.php
            patching file app/code/core/Mage/Adminhtml/Block/Permissions/Variable/Grid.php
            patching file app/code/core/Mage/Adminhtml/controllers/Permissions/BlockController.php
            patching file app/code/core/Mage/Adminhtml/controllers/Permissions/VariableController.php
            patching file app/code/core/Mage/Adminhtml/etc/adminhtml.xml
            patching file app/code/core/Mage/Catalog/Model/Product/Option/Type/File.php
            patching file app/code/core/Mage/Core/Controller/Request/Http.php
            patching file app/code/core/Mage/Core/Controller/Varien/Router/Admin.php
            patching file app/code/core/Mage/Core/Helper/UnserializeArray.php
            patching file app/code/core/Mage/Core/Model/Email/Template/Filter.php
            patching file app/code/core/Mage/Core/Model/Resource/Setup.php
            patching file app/code/core/Mage/Core/etc/config.xml
            patching file app/code/core/Mage/Core/etc/system.xml
            patching file app/code/core/Mage/Customer/Block/Account/Changeforgotten.php
            patching file app/code/core/Mage/Customer/Block/Account/Resetpassword.php
            patching file app/code/core/Mage/Customer/controllers/AccountController.php
            patching file app/code/core/Mage/Downloadable/Model/Product/Type.php
            patching file app/code/core/Mage/Eav/Model/Resource/Attribute/Collection.php
            patching file app/code/core/Mage/Sales/Model/Resource/Order/Item/Collection.php
            patching file app/code/core/Mage/Sales/controllers/DownloadController.php
            patching file app/code/core/Mage/SalesRule/Model/Resource/Coupon/Collection.php
            patching file app/code/core/Zend/XmlRpc/Request.php
            patching file app/code/core/Zend/XmlRpc/Response.php
            patching file app/design/adminhtml/default/default/layout/admin.xml
            patching file app/design/frontend/base/default/layout/customer.xml
            patching file app/design/frontend/base/default/template/customer/form/register.phtml
            patching file app/design/frontend/base/default/template/customer/form/resetforgottenpassword.phtml
            patching file app/design/frontend/base/default/template/page/js/cookie.phtml
            patching file app/design/frontend/base/default/template/persistent/customer/form/register.phtml
            patching file app/design/frontend/default/iphone/layout/customer.xml
            patching file app/design/frontend/default/modern/layout/customer.xml
            patching file app/design/frontend/rwd/default/layout/customer.xml
            patching file app/design/frontend/rwd/default/template/customer/form/resetforgottenpassword.phtml
            patching file app/design/frontend/rwd/default/template/persistent/customer/form/register.phtml
            patching file cron.php
            patching file errors/processor.php
            The next patch would create the file lib/Unserialize/Parser.php,
            which already exists!  Assume -R? [n]
            Apply anyway? [n]
            Skipping patch.
            1 out of 1 hunk ignored
            The next patch would create the file lib/Unserialize/Reader/Arr.php,
            which already exists!  Assume -R? [n]
            Apply anyway? [n]
            Skipping patch.
            1 out of 1 hunk ignored
            The next patch would create the file lib/Unserialize/Reader/ArrKey.php,
            which already exists!  Assume -R? [n]
            Apply anyway? [n]
            Skipping patch.
            1 out of 1 hunk ignored
            The next patch would create the file lib/Unserialize/Reader/ArrValue.php,
            which already exists!  Assume -R? [n]
            Apply anyway? [n]
            Skipping patch.
            1 out of 1 hunk ignored
            The next patch would create the file lib/Unserialize/Reader/Bool.php,
            which already exists!  Assume -R? [n]
            Apply anyway? [n]
            Skipping patch.
            1 out of 1 hunk ignored
            The next patch would create the file lib/Unserialize/Reader/Dbl.php,
            which already exists!  Assume -R? [n]
            Apply anyway? [n]
            Skipping patch.
            1 out of 1 hunk ignored
            The next patch would create the file lib/Unserialize/Reader/Int.php,
            which already exists!  Assume -R? [n]
            Apply anyway? [n]
            Skipping patch.
            1 out of 1 hunk ignored
            The next patch would create the file lib/Unserialize/Reader/Str.php,
            which already exists!  Assume -R? [n]
            Apply anyway? [n]
            Skipping patch.
            1 out of 1 hunk ignored
            patching file lib/Varien/Data/Collection/Db.php
            Reversed (or previously applied) patch detected!  Assume -R? [n]
            Apply anyway? [n]
            Skipping patch.
            2 out of 2 hunks ignored -- saving rejects to file lib/Varien/Data/Collection/Db.php.rej
            patching file lib/Zend/Xml/Security.php
  • I think the .htaccess and .htaccess.sample from the stock download is also patched already, so you can't get a pre-patched .htaccess and .htaccess.sample. I still have pre-patched files if you want them? – Robin Nov 24 '15 at 9:29
  • oh and those other files I probably have them as well, but it's from version 1.7.0.2.. not sure if that matters – Robin Nov 24 '15 at 9:30
  • Thank you Anja, can you please share them with me? – Jahswey Nov 24 '15 at 9:31
  • should I email you them? or just post the contents in an answer? – Robin Nov 24 '15 at 9:32

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.