Parse error: syntax error, unexpected T_STRING, ex

Hi All:

I got message: Parse error: syntax error, unexpected T_STRING, expecting ')'.........on line 479 

Below is the location of the error. I don't what's wrong, especially considering I haven't done anything to this area of my site recently. I tried to correct it several times, but I'm not addressing the issue. Can someone please explain the issue and explain to me how this came about out of seemingly nowhere? Thanks a lot!


'_HELP' => '<p> Common questions on how to use our site can be found in FAQ. If you have a question regarding usage of our site, visit our forum titled Site Help. Gamble Pub is all about engagement and interaction. <p><p> Presenting your questions in our forums, as well as finding answers, stimulates user engagement. It also allows other users the ability to find the answers to similar questions. If you/'re seeking help learning about casino sites and games, we encourage you to explore our articles and visit our forums. Even if your inquiry doesn/'t currently exist in our forums, you can easily post a new topic.  

Best Regards,
Quote · 7 Mar 2014

Looks like an apostrophe is breaking the syntax. From the text you posted, it looks like you are missing the end quote...

'_HELP' => '<p> Common questions on how to use our site can be found in FAQ. If you have a question regarding usage of our site, visit our forum titled Site Help. Gamble Pub is all about engagement and interaction. <p><p> Presenting your questions in our forums, as well as finding answers, stimulates user engagement. It also allows other users the ability to find the answers to similar questions. If you are seeking help learning about casino sites and games, we encourage you to explore our articles and visit our forums. Even if your inquiry doesnt currently exist in our forums, you can easily post a new topic. '

-Armaan

Facebook, Twitter &amp; Instagram Combo - http://bit.ly/1h5CarP
Quote · 7 Mar 2014

Hi Armaan,

Thanks for your response.

I thought that was the issue, but it didn't fix the problem when I tried. I just tried again and its still not working with the same issue. 

Best Regards,
Quote · 7 Mar 2014

For the single quotes within the text, you should escape them with backward slash instead of a forward slash. For example you/'re should be you\'re

Paypal email is jeromemingo@gmail.com - http://www.boonex.com/market/posts/modzzz
Quote · 7 Mar 2014

Hi modzzz,

Thanks for your response. 

I think that's how they were originally. I was just trying so many different things to fix the issue. 

I went ahead and replaced the backward slashes and now I'm getting this message below for the same location:

Parse error: syntax error, unexpected $end, expecting ')' in........on line 479.


If I leave out the end quote, keeping the backward slashes, I receive this message below:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE in........on line 479.

 

Best Regards,
Quote · 7 Mar 2014

If you PM me your site details, I will take a quick look at it for you.

Paypal email is jeromemingo@gmail.com - http://www.boonex.com/market/posts/modzzz
Quote · 7 Mar 2014

Copy the text in the language key to a safe place so you can easily replace it.  Then remove the text completely from the language key and see if any errors occurs.  A blank language key should not throw any errors.  When I compose language keys, I have never worried about escaping characters but maybe I just never ran into an issue where they were needed.  In fact, I paused in this and went and checked and no, no error with a word with an apostrophe.

You might want to look at the MTools Page Editor, free module that will work with 7.1.  Also, compose your text for _HELP in an editor and then copy and paste the text into the language key editor in Dolphin administration and see if the error disappears.  You are actually suppose to edit the language keys in Dolphin admin and not in the language file.

Geeks, making the world a better place
Quote · 7 Mar 2014

Thanks to you both for your responses.

geek_girl,

Thanks for your suggestions. I went ahead and removed all the text and still got a familiar error message:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE ...........langs/lang-en.php on line 479

I really feel the issue has to be somewhere else. I wasn't involved in this area of my site at all when the issue occurred. Even with the lang key blank, I'm still seeing this error message. This is actually the first I ever addressed the lang key in the file, and not the admin panel. I don't get why this is happening. The lang key in the file has been the same for all this time, without any issue. Now, I'm unable to access my site at all. Thanks for the module suggestion. 

 

Modzzz,

I'll send you a PM shortly. Thanks. 

Best Regards,
Quote · 7 Mar 2014

you have an open <p> without closing </p>. I had this error and mod security kept blacklisting my ip address because it knew something was wrong, but for some reason we couldn't get it to keep me whitelisted. It took over an hour to figure out the issue. Try the following (just copy/paste)

'_HELP' => '<p> Common questions on how to use our site can be found in FAQ. If you have a question regarding usage of our site, visit our forum titled Site Help. Gamble Pub is all about engagement and interaction. </p><p> Presenting your questions in our forums, as well as finding answers, stimulates user engagement. It also allows other users the ability to find the answers to similar questions. If you\'re seeking help learning about casino sites and games, we encourage you to explore our articles and visit our forums. Even if your inquiry doesn\'t currently exist in our forums, you can easily post a new topic.</p>'

Quote · 7 Mar 2014

Thanks for your response bcoyle,

I went ahead with your suggestions. I'm getting this error message again, below:

Parse error: syntax error, unexpected T_STRING, expecting ')' ..........langs/lang-en.php on line 479

Its like no matter what changes I'm making to this line, it just switches between errors. Is there anything else you may have done to address the issue when you were experiencing it? 

Best Regards,
Quote · 7 Mar 2014

are you clearing your cache after making changes? Also - are you making the change to the lang-en.php file. If so, do not. The changes need to be reflected in the database itself. EIther make the change to the database itself or in Admin - Advanced Settings - Language Settings. Search for help and the key should appear. then edit it.

Quote · 7 Mar 2014

Yes I did clear cache. I just did so some more after modifying the line, but still same issue. I have been making the changes in the lang-en.php file, since that's where the message was telling the problem was from the beginning. Also, since the error first occurred, I not even able to access my site. I can't get to the admin panel or anything. The only thing I can access and make changes to have been the actual file. 

Before this problem, I never touched anything in the lang file. That's why I'm so confused. And when the issue first arose, I wasn't even doing anything to this area of my site at all. It's really weird. 

Best Regards,
Quote · 7 Mar 2014

making the changes in the lang-en file itself will not resolve your issue. Your next step would be to make the change in the database itself if you can not get into your site - using something like phpMyadmin. Look in the sys_localization_strings table

Quote · 7 Mar 2014

OK. Thanks. 

I went to sys_localization_stringstable in phpmyadmin.

I'm not finding the issue, unless I'm overlooking it. 

Best Regards,
Quote · 7 Mar 2014

as an FYI to others who may run into this error. The issue was that the lang-en.php file was duplicated starting at line 479., plus open paragraph tags with no closing, and 's inside single quotes.

Example - file starts out:

<?PHP   
$LANG = array(
    '_ABOUT_US' => '<p>blu blu blah's<p>
<p>blah blah blah<p>',
    '_ABOUT_US_H' => 'About Us',
    '_ACTION_EVERY_PERIOD' => ' every {4} hours',
    '_ACTION_LIMIT_REACHED' => 'Limit reached. Your current membership (<b>{2}</b>) allows you to {1} no more than {3} times',

<?PHP   
$LANG = array(
    '_ABOUT_US' => '<p>blu blu blah's<p>
<p>blah blah blah<p>',
    '_ABOUT_US_H' => 'About Us',
    '_ACTION_EVERY_PERIOD' => ' every {4} hours',
    '_ACTION_LIMIT_REACHED' => 'Limit reached. Your current membership (<b>{2}</b>) allows you to {1} no more than {3} times',

 

Resolution is to remove duplicated section, fix closing paragraph tags, make sure there is a ); at the end, and then recompile language keys.

Quote · 7 Mar 2014

 Thanks for letting us know and glad you nailed it down, these things happen :)

as an FYI to others who may run into this error. The issue was that the lang-en.php file was duplicated starting at line 479., plus open paragraph tags with no closing, and 's inside single quotes.

Example - file starts out:

<?PHP   
$LANG = array(
    '_ABOUT_US' => '<p>blu blu blah's<p>
<p>blah blah blah<p>',
    '_ABOUT_US_H' => 'About Us',
    '_ACTION_EVERY_PERIOD' => ' every {4} hours',
    '_ACTION_LIMIT_REACHED' => 'Limit reached. Your current membership (<b>{2}</b>) allows you to {1} no more than {3} times',

<?PHP   
$LANG = array(
    '_ABOUT_US' => '<p>blu blu blah's<p>
<p>blah blah blah<p>',
    '_ABOUT_US_H' => 'About Us',
    '_ACTION_EVERY_PERIOD' => ' every {4} hours',
    '_ACTION_LIMIT_REACHED' => 'Limit reached. Your current membership (<b>{2}</b>) allows you to {1} no more than {3} times',

 

Resolution is to remove duplicated section, fix closing paragraph tags, make sure there is a ); at the end, and then recompile language keys.

 

Facebook, Twitter &amp; Instagram Combo - http://bit.ly/1h5CarP
Quote · 7 Mar 2014

Thanks a lot to everyone that helped!

I hope this is helpful to anyone in the future.

Best Regards,
Quote · 7 Mar 2014
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.