cancel
Showing results for 
Search instead for 
Did you mean: 

Syntax error when installing SUPEE-5994

Syntax error when installing SUPEE-5994

When I ran this command:

sh PATCH_SUPEE-5994_EE_1.14.1.0_v1-2015-05-14-05-05-02.sh

 

This was the result:

 

: command not found_1.14.1.0_v1-2015-05-14-05-05-02.sh: line 7:

'ATCH_SUPEE-5994_EE_1.14.1.0_v1-2015-05-14-05-05-02.sh: line 9: syntax error near unexpected token `{

'ATCH_SUPEE-5994_EE_1.14.1.0_v1-2015-05-14-05-05-02.sh: line 9: `_check_installed_tools() {

 

it ran fine on a local development copy of the site running under MAMP - but not on the live siteo.

 

The .sh file is exactly as downloaded from magento and I've checked thea that line endings are still set as Unix (LF)

 

I've installed previous patches without a problem. The site is current running Magento 1.9.1.0 with all previous aptches up to this one already applied.

 

Any ideas??

13 REPLIES 13

Re: Syntax error when installing SUPEE-5994

Yes, I am seeing the same error message. I haven't experienced any problems previously installing patches.

Re: Syntax error when installing SUPEE-5994

I don't see any references in the link in post from MageComp that relate to SUPEE-5994.

 

As far as installing via ssh it just contains standard instructions on installing a .sh patch. That doesn't help at all.

 

 

Re: Syntax error when installing SUPEE-5994

Did you try running the command like this:

 

$ sh ./PATCH_SUPEE-5994_EE_1.14.1.0_v1-2015-05-14-05-05-02.sh

 

If that doesn't work, could you try renaming the patch file to f.e. patch5994.sh and execute that via

 

$ sh ./patch5994.sh

If this response was helpful to you, consider giving kudos to this post.
If this response solved your problem, click accept as solution to help others solve this

Re: Syntax error when installing SUPEE-5994

Hi

 

I tried the above suggestions and got the following message: "permission denied".

 

Any more suggestions?

 

This is the orginal error:

PATCH_SUPEE-5994_EE_1.14.1.0_v1-2015-05-14-05-05-02.sh: line 7: $'\r': command n ot found
PATCH_SUPEE-5994_EE_1.14.1.0_v1-2015-05-14-05-05-02.sh: line 9: syntax error nea r unexpected token `$'{\r''
PATCH_SUPEE-5994_EE_1.14.1.0_v1-2015-05-14-05-05-02.sh: line 9: `_check_installe '_tools() {

 

Mark

Re: Syntax error when installing SUPEE-5994

Permission denied means that you don't have enough permissions on files and/or folders that need to be patched. You could try running it via sudo:

 

$ sudo sh ./PATCH_SUPEE-5994_EE_1.14.1.0_v1-2015-05-14-05-05-02.sh

If this response was helpful to you, consider giving kudos to this post.
If this response solved your problem, click accept as solution to help others solve this

Re: Syntax error when installing SUPEE-5994

Hello @DavidB

 

The link we sent you to try another method of patch installation if command line is not working, you can try FTP method (upload the patch files on Magento) 

It is advisable to take backup of every file you are going to upload for the patch. 

Was my answer helpful? You can accept it as a solution.
175+ Professional Extensions for M1 & M2
Need a developer?Just visit Contact Us Now

Re: Syntax error when installing SUPEE-5994

The link to MageComp does not help. It suggests three methods of applying patches

 

 - Installing the patch via ssh - which is what I've tried and isn't working

 

- Embedding a call to the patch file in php code and running the php. That still means running the same patch that failed in the first option with a syntax error. Given that it's still runnung the same patch code it's likely to give the same result unless the underlying issue is resolved

 

- Upload a copy of the files that have been modified by the patch. Your page offers downloads for a different patch (SUPEE-5344) - but not for this latest patch SUPEE-5994. So this isn't an option

 

So as I said before - this doesn't help.

 

The ftp method would require setting up an archive of patched files for all possible versions of all available patches - which doesn't sound very sustainable.

 

What I need is a solution to the problem of why the patch failed with a syntax error.

Re: Syntax error when installing SUPEE-5994

This article will help you 
Magento Patch Installation Step

Re: Syntax error when installing SUPEE-5994

Amalik - thank you for your contribtion. However the link doesn't help. It's just a brief note of how to run the shell script.

 

It does include mention of a possible error. But that's not the error that I've reported.

 

In any case Magneto provide a far more comprehensive set of instructions on how to apply patches which is available from the Magento Communcity Edition Downloads page in the section headed Magento Community Edition Patches or this direct link to the PDF