Showing results for 
Search instead for 
Did you mean: 

Syntax error when installing SUPEE-6788-

Syntax error when installing SUPEE-6788-

I am getting Parse error: syntax error, unexpected 'class' (T_CLASS) in /home/my_site/public_html/patch.php on line 266

I have read through several documents and also tried to install original htaccess and I'm still getting this error. Any help is greatly appreciated.


Re: Syntax error when installing SUPEE-6788-



Can you post the code for the patch.php file you are using, not come across that file before.


I had problems installing patch on my path to solving it is as below.


Magento Patch Security-patch-6788 - Updating from
 Full instructions
Download patch from

Upload via ftp to the root of your magento install or or similar

Download full download from the Release Archive page here

Copy full the /dev folder up to your magento install and overwrite what is there.

Rename your own htaccess file and copy both .htaccess and .htaccess.sample from the download.

then run the patch file.


Compare and update your .htaccess file from your renamed .htaccess file

Update your cron task.

check it - >crontab -l
edit it - >crontab -e

type ‘i’ to edit/insert

add in below line
*/5 * * * * php /var/www/vhosts/

press escape (top left of keyboard)

type :wq (this means write file then quit)

screen should say ‘crontab: installing new crontab’

If you would like to monitor your cron tasks for a particular magento site, please check the following links.

Once it runs successfully, make sure you update your custom template files as per here.

change your admin and downloader dir names or restrict via htaccess -

And then start the process of cataloging all the extensions that need the  admin flag updating



Re: Syntax error when installing SUPEE-6788-

I uploaded the entire patch folder and the patch worked. I checked my site at    and it says the patch was applied.

Two areas not secure are Unprotected development files


I read to fix this by Restrict Admin Access To Only Approved IP Addresses


This can be achieved via .htaccess

<LocationMatch "admin">
Order Deny,Allow
Deny from All
Allow from


2.Admin/downloader unprotected

The fix they say did not work

order deny,allow

deny from all

allow from my ip


can you please tell me how to secure these two areas?