Results 1 to 7 of 7
  1. #1
    Join Date
    Dec 2007
    Location
    Belfast, N.Ireland
    Posts
    96
    Plugin Contributions
    0

    Default Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING

    I just can't figure this at all

    I wanted to get a 'beta' version of my site to be able to test out mods, and other stuff, so I am not working on the live version. As it's been modified with add on's and template changes etc, I didn't want to have to install from fresh.

    So, I created a /beta/ folder on my server, then copied my entire site from my local copy to the server.

    The site loads fine, and the admin works fine 'nearly'. There is just one thing I can find there being a problem with.

    Admin > Customers > Customers

    I get a blank page except for one line of text:

    Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/xxxx/public_html/beta/admin/includes/languages/english/customers.php on line 57

    I have tried this process a number of times, each time the same result.

    I have tried feeding the site both my existing database, and then tried off a copy of the database - the result is the same.

    One thing that 'may' be a factor (I don't know, it's just a wild guess) is that I had a guy put a couple of extra fields into my customers records. Though, these don't show on this page. Although, it has to be said, my live site works fine, it;s only when I copy it that this all goes wrong.

    Any ideas?

    Zen Cart 1.3.8a
    Database Patch Level: 1.3.8

    (When I get this working, I can sort out upgrading)

    BTW, I have been searching on here, and can't find a solution that works. Though I haven't found the exact error, I have tried looking at varius parse error files.


    Thanks

    Paul
    Last edited by ardhill; 3 Jun 2010 at 05:15 PM. Reason: Adding Information

  2. #2
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,269
    Plugin Contributions
    3

    Default Re: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING

    I had a T-STRING error and it was a result of an old version of PHP running on the server.
    20 years a Zencart User

  3. #3
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING

    The error message is telling you the exact file and line where PHP finds the error. Sometimes the cause of the error is a line or two back, but certainly in the file and close to line number given and these types of errors are frequently associated with missing or mismatched apostrophes.

    But since you haven't posted the piece of code with the error, we can't be any more specific than that and I'm a bit puzzled as to what type of help you're hoping for.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  4. #4
    Join Date
    Dec 2007
    Location
    Belfast, N.Ireland
    Posts
    96
    Plugin Contributions
    0

    Default Re: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING

    Quote Originally Posted by schoolboy View Post
    I had a T-STRING error and it was a result of an old version of PHP running on the server.
    Though, everthing is exactly the same as my live site. I even tried the same database. The only difference is a different folder

    [PHP Version: 5.2.11]

  5. #5
    Join Date
    Dec 2007
    Location
    Belfast, N.Ireland
    Posts
    96
    Plugin Contributions
    0

    Default Re: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING

    Quote Originally Posted by kuroi View Post
    But since you haven't posted the piece of code with the error, we can't be any more specific than that and I'm a bit puzzled as to what type of help you're hoping for.
    Hi Kuroi

    As I uploaded an exact copy of the site that is currently working fine, I really wasn't sure it was as simple as that. I have no idea what the problem is. Here is a copy of the file code:

    Code:
    <?php
    /**
     * @package admin
     * @copyright Copyright 2003-2007 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: customers.php 6352 2007-05-20 21:05:01Z drbyte $
     */
    
    define('HEADING_TITLE', 'Customers');
    
    define('TABLE_HEADING_ID', 'ID#');
    define('TABLE_HEADING_FIRSTNAME', 'First Name');
    define('TABLE_HEADING_LASTNAME', 'Last Name');
    define('TABLE_HEADING_ACCOUNT_CREATED', 'Account Created');
    define('TABLE_HEADING_LOGIN', 'Last Login');
    define('TABLE_HEADING_ACTION', 'Action');
    define('TABLE_HEADING_PRICING_GROUP', 'Pricing Group');
    define('TABLE_HEADING_AUTHORIZATION_APPROVAL', 'Authorized');
    define('TABLE_HEADING_GV_AMOUNT', 'GV Balance');
    
    define('TEXT_DATE_ACCOUNT_CREATED', 'Account Created:');
    define('TEXT_DATE_ACCOUNT_LAST_MODIFIED', 'Last Modified:');
    define('TEXT_INFO_DATE_LAST_LOGON', 'Last Logon:');
    define('TEXT_INFO_NUMBER_OF_LOGONS', 'Number of Logons:');
    define('TEXT_INFO_COUNTRY', 'Country:');
    define('TEXT_INFO_NUMBER_OF_REVIEWS', 'Number of Reviews:');
    define('TEXT_DELETE_INTRO', 'Are you sure you want to delete this customer?');
    define('TEXT_DELETE_REVIEWS', 'Delete %s review(s)');
    define('TEXT_INFO_HEADING_DELETE_CUSTOMER', 'Delete Customer');
    define('TYPE_BELOW', 'Type below');
    define('PLEASE_SELECT', 'Select One');
    define('TEXT_INFO_NUMBER_OF_ORDERS', 'Number of Orders:');
    define('TEXT_INFO_LAST_ORDER','Last Order:');
    define('TEXT_INFO_ORDERS_TOTAL', 'Total:');
    define('CUSTOMERS_REFERRAL', 'Customer Referral<br />1st Discount Coupon');
    define('TEXT_INFO_GV_AMOUNT', 'GV Balance');
    
    define('ENTRY_NONE', 'None');
    
    define('TABLE_HEADING_COMPANY','Company');
    
    define('CUSTOMERS_AUTHORIZATION', 'Customers Authorization Status');
    define('CUSTOMERS_AUTHORIZATION_0', 'Approved');
    define('CUSTOMERS_AUTHORIZATION_1', 'Pending Approval - Must be Authorized to Browse');
    define('CUSTOMERS_AUTHORIZATION_2', 'Pending Approval - May Browse No Prices');
    define('CUSTOMERS_AUTHORIZATION_3', 'Pending Approval - May browse with prices but may not buy');
    define('CUSTOMERS_AUTHORIZATION_4', 'Banned - Not allowed to login or shop');
    define('ERROR_CUSTOMER_APPROVAL_CORRECTION1', 'Warning: Your shop is set up for Approval with No Browse. The customer has been set to Pending Approval - No Browse');
    define('ERROR_CUSTOMER_APPROVAL_CORRECTION2', 'Warning: Your shop is set up for Approval with Browse no prices. The customer has been set to Pending Approval - Browse No Prices');
    
    define('EMAIL_CUSTOMER_STATUS_CHANGE_MESSAGE', 'Hi' . "\n\n" .  'One of the team has reviewed your account application, and has approved it' . "\n\n" .  ' As a welcome gift, we have credited your account with £5 worth of Reward Points, avaiable to spend right away. You can learn more about Reward Points in your "My Account" section.' . "\n\n" .  ' Since your account is now fully activated, you can now log in, view prices, purchase products and avail of the other benefits of membership.' . "\n\n" .  ' Many Thanks for registering online.' . "\n\n" . "\n\n" .  "\nHBA Ireland\n" . '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'.HTTP_SERVER . DIR_WS_CATALOG ."</a>\n\n"");
    define('EMAIL_CUSTOMER_STATUS_CHANGE_SUBJECT', 'HBA Ireland - Status Updated');
    
    define('ADDRESS_BOOK_TITLE', 'Address Book Entries');
    define('PRIMARY_ADDRESS', '(primary address)');
    define('TEXT_MAXIMUM_ENTRIES', '<span class="coming"><strong>NOTE:</strong></span> A maximum of %s address book entries allowed.');
    define('TEXT_INFO_ADDRESS_BOOK_COUNT', ' | 1 of  ');
    ?>
    The line in questio (Line 57) is the 3rd from the bottom starting with "define('TEXT_MAXIMUM_ENTRIES"

    Thanks

    Paul

  6. #6
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING

    The problem is several lines back (the definition for EMAIL_CUSTOMER_STATUS_CHANGE_MESSAGE) where you have a duplicate double quote at the end.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  7. #7
    Join Date
    Dec 2007
    Location
    Belfast, N.Ireland
    Posts
    96
    Plugin Contributions
    0

    Default Re: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING

    Quote Originally Posted by kuroi View Post
    The problem is several lines back (the definition for EMAIL_CUSTOMER_STATUS_CHANGE_MESSAGE) where you have a duplicate double quote at the end.
    Unbelieveable!

    That very file works on one site, but didn't on another.

    Yes, that did the trick - thanks VERY much, I don't know how many hours I have been looking at stuff I don't hava a clue about on this matter, only to find out that it was that!

    Thanks Kuroi

 

 

Similar Threads

  1. Replies: 5
    Last Post: 27 Sep 2014, 10:53 AM
  2. Replies: 0
    Last Post: 29 Feb 2012, 02:07 AM
  3. Install: Parse error: syntax error, unexpected '/' in /includes/application_top.php
    By dlucarelli in forum Installing on a Linux/Unix Server
    Replies: 8
    Last Post: 26 Aug 2010, 02:08 PM
  4. Replies: 4
    Last Post: 30 Aug 2009, 09:26 PM
  5. Replies: 3
    Last Post: 15 Apr 2009, 03:23 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