1

MageReport.com reports a client website does not have Security patch 6788 applied.

I have applied this patch more than once, and MageReport.com continues to report that it has not been applied.

I noticed that /public_html/.htaccess.sample was missing, so I uploaded it, applied the patch again, and MageReport.com still reports the patch is missing.

When I run the patch in Putty SSH shell, I receive the output:

PATCH_SUPEE-6788_CE_1.9.1.0_v1-2015-10-27-09-06-11.sh: 14: PATCH_SUPEE-6788_CE_1.9.1.0_v1-2015-10-27-09-06-11.sh: 127                                 : not found
PATCH_SUPEE-6788_CE_1.9.1.0_v1-2015-10-27-09-06-11.sh: 14: PATCH_SUPEE-6788_CE_1.9.1.0_v1-2015-10-27-09-06-11.sh: 127                                 : not found
PATCH_SUPEE-6788_CE_1.9.1.0_v1-2015-10-27-09-06-11.sh: 25: PATCH_SUPEE-6788_CE_1.9.1.0_v1-2015-10-27-09-06-11.sh: 0:                                  not found
Checking if patch can be applied/reverted successfully...
-e ERROR: Patch can't be applied/reverted successfully.

checking file .htaccess
Hunk #1 FAILED at 207.
1 out of 1 hunk FAILED
checking file .htaccess.sample
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored
checking file app/code/core/Mage/Admin/Model/Block.php
checking file app/code/core/Mage/Admin/Model/Resource/Block.php
checking file app/code/core/Mage/Admin/Model/Resource/Block/Collection.php
checking file app/code/core/Mage/Admin/Model/Resource/Variable.php
checking file app/code/core/Mage/Admin/Model/Resource/Variable/Collection.php
checking file app/code/core/Mage/Admin/Model/Variable.php
checking file app/code/core/Mage/Admin/etc/config.xml
checking file app/code/core/Mage/Admin/sql/admin_setup/upgrade-1.6.1.1-1.6.1.2.php
checking file app/code/core/Mage/Adminhtml/Block/Permissions/Block.php
checking file app/code/core/Mage/Adminhtml/Block/Permissions/Block/Edit.php
checking file app/code/core/Mage/Adminhtml/Block/Permissions/Block/Edit/Form.php
checking file app/code/core/Mage/Adminhtml/Block/Permissions/Block/Grid.php
checking file app/code/core/Mage/Adminhtml/Block/Permissions/Variable.php
checking file app/code/core/Mage/Adminhtml/Block/Permissions/Variable/Edit.php
checking file app/code/core/Mage/Adminhtml/Block/Permissions/Variable/Edit/Form.php
checking file app/code/core/Mage/Adminhtml/Block/Permissions/Variable/Grid.php
checking file app/code/core/Mage/Adminhtml/controllers/Permissions/BlockController.php
checking file app/code/core/Mage/Adminhtml/controllers/Permissions/VariableController.php
checking file app/code/core/Mage/Adminhtml/etc/adminhtml.xml
checking file app/code/core/Mage/Catalog/Model/Product/Option/Type/File.php
checking file app/code/core/Mage/Core/Controller/Request/Http.php
Hunk #1 succeeded at 291 (offset -7 lines).
checking file app/code/core/Mage/Core/Controller/Varien/Router/Admin.php
checking file app/code/core/Mage/Core/Helper/UnserializeArray.php
checking file app/code/core/Mage/Core/Model/Email/Template/Filter.php
checking file app/code/core/Mage/Core/Model/Resource/Setup.php
checking file app/code/core/Mage/Core/etc/config.xml
checking file app/code/core/Mage/Core/etc/system.xml
checking file app/code/core/Mage/Customer/Block/Account/Changeforgotten.php
checking file app/code/core/Mage/Customer/Block/Account/Resetpassword.php
checking file app/code/core/Mage/Customer/controllers/AccountController.php
checking file app/code/core/Mage/Downloadable/Model/Product/Type.php
checking file app/code/core/Mage/Eav/Model/Resource/Attribute/Collection.php
checking file app/code/core/Mage/Sales/Model/Resource/Order/Item/Collection.php
checking file app/code/core/Mage/Sales/controllers/DownloadController.php
checking file app/code/core/Mage/SalesRule/Model/Resource/Coupon/Collection.php
checking file app/code/core/Zend/XmlRpc/Request.php
checking file app/code/core/Zend/XmlRpc/Response.php
checking file app/design/adminhtml/default/default/layout/admin.xml
checking file app/design/frontend/base/default/layout/customer.xml
checking file app/design/frontend/base/default/template/customer/form/register.phtml
checking file app/design/frontend/base/default/template/customer/form/resetforgottenpassword.phtml
checking file app/design/frontend/base/default/template/page/js/cookie.phtml
checking file app/design/frontend/base/default/template/persistent/customer/form/register.phtml
checking file app/design/frontend/default/iphone/layout/customer.xml
checking file app/design/frontend/default/modern/layout/customer.xml
checking file app/design/frontend/rwd/default/layout/customer.xml
checking file app/design/frontend/rwd/default/template/customer/form/resetforgottenpassword.phtml
checking file app/design/frontend/rwd/default/template/persistent/customer/form/register.phtml
checking file cron.php
checking file errors/processor.php
checking file lib/Unserialize/Parser.php
checking file lib/Unserialize/Reader/Arr.php
checking file lib/Unserialize/Reader/ArrKey.php
checking file lib/Unserialize/Reader/ArrValue.php
checking file lib/Unserialize/Reader/Bool.php
checking file lib/Unserialize/Reader/Dbl.php
checking file lib/Unserialize/Reader/Int.php
checking file lib/Unserialize/Reader/Str.php
checking file lib/Varien/Data/Collection/Db.php
checking file lib/Zend/Xml/Security.php

I am not skilled to ensure this patch is applied successfully.

Help appreciated.

Running Magento 1.9.1.0.

2

Put .htaccess and .htaccess.sample file from default Magento version 1.9.1.0 and try to patch again.

Also if you have made any changes to file app/code/core/Mage/Core/Controller/Request/Http.php take it from default version of Magento.

  • Beautiful! The default .htaccess was missing - there was a custom .htaccess file there. Uploading the default meant the patch reported as being applied successfully. Thank you Akhilesh! – Steve Dec 19 '15 at 6:44
1

There's some errors at the top when you apply the patch

PATCH_SUPEE-6788_CE_1.9.1.0_v1-2015-10-27-09-06-11.sh: 14: PATCH_SUPEE-6788_CE_1.9.1.0_v1-2015-10-27-09-06-11.sh: 127 : not found

PATCH_SUPEE-6788_CE_1.9.1.0_v1-2015-10-27-09-06-11.sh: 14: PATCH_SUPEE-6788_CE_1.9.1.0_v1-2015-10-27-09-06-11.sh: 127 : not found

PATCH_SUPEE-6788_CE_1.9.1.0_v1-2015-10-27-09-06-11.sh: 25: PATCH_SUPEE-6788_CE_1.9.1.0_v1-2015-10-27-09-06-11.sh: 0: not found

Checking if patch can be applied/reverted successfully...

-e ERROR: Patch can't be applied/reverted successfully.

To fix this, try running the patches using the 'bash' command, instead of 'sh'. The Magento patches don't run that well if your 'sh' isn't linked to 'bash'. This is the case on a lot of servers, but isn't something Magento has taken into consideration.

As for the reason it's reported as uninstalled, we found out that there are several reasons why Patch 6788 comes out as uninstalled on Magereport.com, so we recommend you to check the following:

  • Check if the patch is installed in the correct directory; This looks to be done, as the patch applies
  • Check your shops’ .htaccess. If you’ve made any adjustements in your .htaccess, it’s possible the patch is only partially installed; Looks good, since all the patches applied.
  • Using a Magento version older them Magento 1.6.1.0? Update to a more recent version. When patching Magento versions older then Magento 1.6.1.0, certain redirects aren’t added. Looks like you're running on 1.9.1.0
  • Reload your opcode cache, webserver, php-fpm process and possible other caches. The old code might be still be active;
  • When compilation is enabled in the backend of your Magento, SUPEE-6482 doesn’t work properly. Disable compilation (navigate to System > Tools > Compilation page and click on Disable button) to make sure the patch works. After disabling compilation, check your site with magereport.com again. If the check still comes out as not installed, try re-compiling.
  • Thanks for your help Cipriano. How do I Reload your opcode cache, webserver, php-fpm process and possible other caches ? I refreshed all caches, and restarted Apache. Magento is not compiled. MageReport still reports the patch is missing. – Steve Dec 19 '15 at 6:40

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.