Post by Len77 » Mon Jul 02, 2012 12:42 pm

Hello,

I am getting this message:
Parse error: syntax error, unexpected T_VARIABLE in ....public_html/catalog/language/slovak/total/sub_total.php on line 1

This message appears after clicking from OpenCart Administration on "Store Front". I checked the link for the error but I can't find it. This error appeared after I installed the new language file. I checked also for its English file version and both are identical. I can't see where is the mistake. When I view my website on the net, it is viewed correctly, but from the administration I can't view it.
Could you please help me if you know what is incorrect?
Thank you.

New member

Posts

Joined
Thu Apr 07, 2011 4:21 pm

Post by inactiveaccount9912 » Tue Jul 03, 2012 4:22 am

Include a link to your store to see if the error occurs when we view your site.
Sometimes if I edited a file directly from the ftp client, when I saved it, it moved all the code in the file to the first line so thats why the error occured to me when I didnt change something that could generate an error. Do you think it could be the same case to you?

Expert Member

Posts

Joined
Fri May 14, 2010 2:36 am

Post by Len77 » Wed Jul 04, 2012 11:07 am

Hello florinsith,
You were right, the code moved to the first line itself. This created problem where all the translated words didn't show correctly. The translation looked like e.g.: text_message, text_cart instead of translated words. I corrected the files as you suggested and now it is ok. But the Parse error still exists for three of those files. It's total.php, sub_total.php and credit.php. These three files look correct inside. Their content isn't in the first line. ??? I don't know.
The link is http://www.bioaorganic.com.
Thank you & Regards,

New member

Posts

Joined
Thu Apr 07, 2011 4:21 pm

Post by inactiveaccount9912 » Wed Jul 04, 2012 4:54 pm

Please post the code of atleast one of those files.

Expert Member

Posts

Joined
Fri May 14, 2010 2:36 am

Post by Len77 » Sat Jul 14, 2012 11:11 am

I again checked the encoding for those two files and for some reason they were set as ANSI. So, I converted them to UTF-8 without BOM and it corrected the problem. It is ok now.

Thank you very much for your support!

New member

Posts

Joined
Thu Apr 07, 2011 4:21 pm

Post by ccarusi » Thu Oct 19, 2017 12:12 pm

I just upgraded to version 2.3.0.2 from 1.5.6.4 and getting this error on the Admin side

Parse error: syntax error, unexpected '$this' (T_VARIABLE) in /home/www/mystore.com/admin/model/localisation/language.php on line 224

Line 224 reads like this: $this->db->query("DELETE FROM " . DB_PREFIX . "category_description WHERE language_id = '" . (int)$language_id . "'");

I deleted the Spanish language files as well as the US-English
Can any tell me why am I getting this?
It's also happening when I try to go into the settings.

Newbie

Posts

Joined
Thu Oct 19, 2017 7:32 am

Post by inactiveaccount9912 » Sat Oct 21, 2017 3:03 pm

And which is the line before that one?

Expert Member

Posts

Joined
Fri May 14, 2010 2:36 am
Who is online

Users browsing this forum: No registered users and 29 guests