Results 1 to 10 of 10
  1. #1
    Join Date
    Sep 2008
    Posts
    7
    Plugin Contributions
    0

    Default PHP Parse error: parse error, unexpected T_STRING

    Hello! Much like others I am really pretty new at this stuff. I searched around the forum but was not able to correct my problem.

    I keep getting the following error:

    PHP Parse error: parse error, unexpected T_STRING in /home/content/j/m/o/jmoyer1976/html/zencart/includes/languages/english.php on line 149

    Which has resulted in me not being able to open "Online Catalog"

    Line 149 is in red.
    // currencies box text in sideboxes/currencies.php
    define('BOX_HEADING_CURRENCIES', 'Currencies');

    // information box text in sideboxes/information.php
    define('BOX_HEADING_INFORMATION', 'Information');
    define('BOX_INFORMATION_PRIVACY', 'Privacy Notice');
    define('BOX_INFORMATION_CONDITIONS', 'Conditions of Use');
    define('BOX_INFORMATION_SHIPPING', 'Shipping & Returns');
    define('BOX_INFORMATION_CONTACT', 'Contact Us');
    define('BOX_BBINDEX', 'Forum');
    define('BOX_INFORMATION_UNSUBSCRIBE', 'Newsletter Unsubscribe');

    define('BOX_INFORMATION_SITE_MAP', 'Site Map');

    What am I missing?
    Any help would be much appreciated. Thank you in advance.

  2. #2
    Join Date
    Jun 2003
    Posts
    33,721
    Plugin Contributions
    0

    Default Re: PHP Parse error: parse error, unexpected T_STRING

    What were you doing at the time the error began? Have you reverted the change you made?
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  3. #3

    Default Re: PHP Parse error: parse error, unexpected T_STRING

    The particular code that you pasted does not contain any T_STRING error. Is it still giving you the error as being in /english.php on line 149?

    Sometimes, if you are uploading files (depending on your ftp and host settings) and it has not completely uploaded then it will give a T_STRING error since the file may for example be missing the last 100 lines or so.

    In another words, if you are trying to view your cart as your are uploading (or if an upload has failed or timed out halfway through) you may get an error like this.

  4. #4
    Join Date
    Sep 2008
    Posts
    7
    Plugin Contributions
    0

    Default Re: PHP Parse error: parse error, unexpected T_STRING

    Well, at the time error started occurring I was working on my Define Pages.

    I thought I reverted to when the error occurred by changing the line 149 back to the default, but that didn't seem to work.

    Is another change I made while working on my Define Pages possibly causing the error? How do I find which change caused the problem? Possibly CONDITIONS, noted in 149?

    Thanks for the help!

  5. #5
    Join Date
    Sep 2008
    Posts
    7
    Plugin Contributions
    0

    Default Re: PHP Parse error: parse error, unexpected T_STRING

    I re-counted, subtracted, added lines, and it seems as though this line is the problem:


    // information box text in sideboxes/information.php
    define('BOX_HEADING_INFORMATION', 'Information');
    define('BOX_INFORMATION_PRIVACY', 'Privacy Notice');
    define('BOX_INFORMATION_CONDITIONS', 'Conditions of Use');
    define('BOX_INFORMATION_SHIPPING', 'Shipping & Returns');
    define('BOX_INFORMATION_CONTACT', 'Contact Us');
    define('BOX_BBINDEX', 'Forum');
    define('BOX_INFORMATION_UNSUBSCRIBE', 'Newsletter Unsubscribe');

    define('BOX_INFORMATION_SITE_MAP', 'Site Map');
    <---this blank line
    // information box text in sideboxes/more_information.php - were TUTORIAL_
    define('BOX_HEADING_MORE_INFORMATION', 'More Information');

    Does anyone see a problem? Thanks again!

  6. #6

    Default Re: PHP Parse error: parse error, unexpected T_STRING

    The code you posted does not have an error in it (i ran it in a php interpreter). Maybe that blank line has some kind of unprintable ascii character on it that does not show up in say a text editor, but would in a hex editor?

    My curiosity is piqued. Can you try making a copy of the file, renamed to english.txt and then giving us a link to that?

  7. #7
    Join Date
    Sep 2008
    Posts
    7
    Plugin Contributions
    0

    Default Re: PHP Parse error: parse error, unexpected T_STRING

    Thanks for the help!

    I have put both the php and txt file at:

    http://www.box.net/shared/dg5lyzpe6b

    http://www.box.net/shared/cs5895vrkd

    Let me know if the links don't work.

    I am extremely new at this and very confused.

  8. #8

    Default Re: PHP Parse error: parse error, unexpected T_STRING

    Here is your problems

    define('BOX_INFORMATION_PAGE_2', 'General FAQ's');
    define('BOX_INFORMATION_PAGE_3', 'Slot Machine FAQ's');
    define('BOX_INFORMATION_PAGE_4', 'Dice Control FAQ's');

    the single quotes in the values are causing the error

  9. #9
    Join Date
    Jun 2003
    Posts
    33,721
    Plugin Contributions
    0

    Default Re: PHP Parse error: parse error, unexpected T_STRING

    You need to escape the single quotes with a backslash.

    Example:

    define('BOX_INFORMATION_PAGE_2', 'General FAQ\'s');
    define('BOX_INFORMATION_PAGE_3', 'Slot Machine FAQ\'s');
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  10. #10
    Join Date
    Sep 2008
    Posts
    7
    Plugin Contributions
    0

    Default Re: PHP Parse error: parse error, unexpected T_STRING

    Thanks so much! Everything is back to normal.

    You guys are the best!

 

 

Similar Threads

  1. PHP Parse error: syntax error, unexpected T_STRING
    By absoluteblock in forum General Questions
    Replies: 4
    Last Post: 2 Oct 2011, 03:40 AM
  2. PHP Parse error: syntax error, unexpected T_STRING
    By derek53 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 11 Apr 2011, 08:09 PM
  3. Replies: 20
    Last Post: 21 Nov 2010, 02:48 AM
  4. Replies: 3
    Last Post: 13 Mar 2009, 05:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg