cancel
Showing results for 
Search instead for 
Did you mean: 

Patch 6285 Syntax error: "(" unexpected (expecting "then")

Patch 6285 Syntax error: "(" unexpected (expecting "then")

I am trying to apply this patch, but unfurtunetly, I got this error

 

 sh PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh
: not found-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh: 7:
: not found-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh: 11:
PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh: 169: Syntax error: word unexpected (expecting ")")

 

Did anybody have the same problem?

 

Thanks

3 REPLIES

Re: Patch 6285 Syntax error: "(" unexpected (expecting "then")

I have found the the solution of this problem.
the problem arrives then you download with filezilla, so I used netbean upload,and after I did not have this problem,
but another problem appeared.

 

 

sh PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh
PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh: 24: 127: not found
PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh: 24: 127: not found
PATCH_SUPEE-6285_CE_1.9.1.1_v2-2015-07-08-08-07-43.sh: 29: 0: not found
Checking if patch can be applied/reverted successfully...
-e ERROR: Patch can't be applied/reverted successfully.

patching file app/Mage.php
patching file app/code/community/Phoenix/Moneybookers/controllers/MoneybookersController.php
patching file app/code/core/Mage/Adminhtml/Controller/Action.php
patching file app/code/core/Mage/Adminhtml/controllers/AjaxController.php
patching file app/code/core/Mage/Adminhtml/controllers/Catalog/Category/WidgetController.php
patching file app/code/core/Mage/Adminhtml/controllers/Catalog/Product/DatafeedsController.php
patching file app/code/core/Mage/Adminhtml/controllers/Catalog/Product/ReviewController.php
patching file app/code/core/Mage/Adminhtml/controllers/Catalog/Product/WidgetController.php
patching file app/code/core/Mage/Adminhtml/controllers/Cms/Block/WidgetController.php
patching file app/code/core/Mage/Adminhtml/controllers/Cms/Page/WidgetController.php
patching file app/code/core/Mage/Adminhtml/controllers/Cms/PageController.php
patching file app/code/core/Mage/Adminhtml/controllers/Cms/WysiwygController.php
patching file app/code/core/Mage/Adminhtml/controllers/Customer/System/Config/ValidatevatController.php
patching file app/code/core/Mage/Adminhtml/controllers/JsonController.php
patching file app/code/core/Mage/Adminhtml/controllers/NotificationController.php
patching file app/code/core/Mage/Adminhtml/controllers/Report/CustomerController.php
patching file app/code/core/Mage/Adminhtml/controllers/Report/ProductController.php
patching file app/code/core/Mage/Adminhtml/controllers/Report/ReviewController.php
patching file app/code/core/Mage/Adminhtml/controllers/Report/SalesController.php
patching file app/code/core/Mage/Adminhtml/controllers/Report/ShopcartController.php
patching file app/code/core/Mage/Adminhtml/controllers/Report/TagController.php
patching file app/code/core/Mage/Adminhtml/controllers/ReportController.php
patching file app/code/core/Mage/Adminhtml/controllers/Rss/CatalogController.php
patching file app/code/core/Mage/Adminhtml/controllers/Rss/OrderController.php
patching file app/code/core/Mage/Adminhtml/controllers/Sales/Billing/AgreementController.php
patching file app/code/core/Mage/Adminhtml/controllers/Sales/Order/View/GiftmessageController.php
patching file app/code/core/Mage/Adminhtml/controllers/Sales/Recurring/ProfileController.php
patching file app/code/core/Mage/Adminhtml/controllers/Sales/TransactionsController.php
patching file app/code/core/Mage/Adminhtml/controllers/System/Config/System/StorageController.php
patching file app/code/core/Mage/Adminhtml/controllers/TagController.php
patching file app/code/core/Mage/Adminhtml/controllers/Tax/RateController.php
patching file app/code/core/Mage/Adminhtml/controllers/TaxController.php
patching file app/code/core/Mage/Api2/controllers/Adminhtml/Api2/AttributeController.php
patching file app/code/core/Mage/Bundle/controllers/Adminhtml/Bundle/SelectionController.php
patching file app/code/core/Mage/Captcha/controllers/Adminhtml/RefreshController.php
patching file app/code/core/Mage/Centinel/controllers/Adminhtml/Centinel/IndexController.php
patching file app/code/core/Mage/Checkout/controllers/MultishippingController.php
patching file app/code/core/Mage/Connect/controllers/Adminhtml/Extension/LocalController.php
patching file app/code/core/Mage/ImportExport/Model/Abstract.php
patching file app/code/core/Mage/Oauth/controllers/Adminhtml/Oauth/AuthorizeController.php
patching file app/code/core/Mage/Paygate/controllers/Adminhtml/Paygate/Authorizenet/PaymentController.php
patching file app/code/core/Mage/Paypal/controllers/Adminhtml/Paypal/ReportsController.php
patching file app/code/core/Mage/Rss/controllers/CatalogController.php
patching file app/code/core/Mage/Rss/controllers/OrderController.php
patching file app/code/core/Mage/Widget/Block/Adminhtml/Widget/Chooser.php
patching file app/code/core/Mage/Widget/controllers/Adminhtml/WidgetController.php
patching file app/design/frontend/base/default/template/checkout/cart.phtml
patching file app/design/frontend/base/default/template/checkout/cart/noItems.phtml
patching file app/design/frontend/base/default/template/checkout/onepage/failure.phtml
patching file app/design/frontend/base/default/template/rss/order/details.phtml
patching file app/design/frontend/base/default/template/wishlist/email/rss.phtml
patching file app/design/frontend/default/modern/template/checkout/cart.phtml
Hunk #1 FAILED at 97.
1 out of 1 hunk FAILED -- saving rejects to file app/design/frontend/default/modern/template/checkout/cart.phtml.rej
patching file app/design/frontend/rwd/default/template/checkout/cart.phtml
patching file downloader/Maged/.htaccess
patching file downloader/Maged/Controller.php
patching file downloader/Maged/Model/Session.php
patching file downloader/lib/.htaccess
patching file downloader/template/connect/packages.phtml
patching file downloader/template/connect/packages_prepare.phtml
patching file downloader/template/login.phtml
patching file downloader/template/settings.phtml
patching file errors/processor.php

Tags (2)

Re: Patch 6285 Syntax error: "(" unexpected (expecting "then")

this error arrives then you download with filezilla, so I used netbean upload,and after I did not have this problem,

Re: Patch 6285 Syntax error: "(" unexpected (expecting "then")

This is what happens when you use an FTP/SFTP client that doesn't do proper line endings translation (CRLF to LF) during the upload. The *nix shell dies when it doesn't find the proper LF line endings in the shell script you're trying to run.

 

Another method is to run the file through dos2unix after uploading it to correct the line ending mismatch.

 

Also ditch using FTP, it passes your login credentials and all data in plaintext which means that your FTP login can be stolen with a simple packet sniff. Use SFTP or an SCP client like WinSCP for security reasons.