Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2011
    Location
    Tennessee
    Posts
    13
    Plugin Contributions
    0

    Default Syntax error Unexpected $end

    I am a relative Zencart newbie, and I have a problem that I cannot solve. I have tried all the suggestions that I can find in this forum, and none of them have helped yet.

    My site was working correctly until 3 days ago, and since that time, when I try to go from Step 1 of 3 in my checkout process, the process hangs up. I am using 1.3.9h.

    The error is as follows:
    Parse error: syntax error, unexpected $end in /home/content/51/7938251/html/zencart/includes/modules/payment/authorizenet_aim.php on line 871

    I used the developers tool kit and discovered that I needed to reload the original files to ensure that I had the language file and module file in the correct spot, and it made no difference. So far, I have not put my modifications back into the files until I can resolve the error.

    The last few lines of the referenced module are:
    if ($response_code != '1' || ($response[0]==1 && $response[2] == 310) ) {
    $messageStack->add_session($response_alert, 'error');
    } else {
    // Success, so save the results
    $sql_data_array = array('orders_id' => (int)$oID,
    'orders_status_id' => (int)$new_order_status,
    'date_added' => 'now()',
    'comments' => 'VOIDED. Trans ID: ' . $response[6] . ' ' . $response[4] . "\n" . $voidNote,
    'customer_notified' => 0
    );
    zen_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array);
    $db->Execute("update " . TABLE_ORDERS . "
    set orders_status = '" . (int)$new_order_status . "'
    where orders_id = '" . (int)$oID . "'");
    $messageStack->add_session(sprintf(MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_VOID_INITIATED, $response[6], $response[4]), 'success');
    return true;
    }
    return false;
    }
    ?>

    I would appreciate any assistance that anyone can offer on this holiday.

    My site URL is: HTTPS://www.a p p a l a c h i a s t i t c h e s. c o m/z e n c a r t /


  2. #2
    Join Date
    Jun 2011
    Location
    Tennessee
    Posts
    13
    Plugin Contributions
    0

    Default Re: Syntax error Unexpected $end

    Do not ask me why it is as it is, but I have resolved my problem. The only thing that I can identify that I did to fix it was to put the code at the end of the module back to the way it was when the error message first appeared; i.e. I put an additional } between the return true and return false statements, and I changed the ?> back to a }. Now it is working? Sometimes computers can be very exasperating, as I lost my entire holiday weekend on this issue.

    Thanks to all who read the post, even though no one had any ideas for solution it is comforting to know that they are being read.

    Hope you had a wonderful Fourth!

  3. #3
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,513
    Plugin Contributions
    126

    Default Re: Syntax error Unexpected $end

    One tip: In Zen 1.3.9, there's a file created in the cache directory when a parse error occurs on a page; you can use this information to track down the error. The filename ends with log and the name contains the date and a string which indicates whether it happened in the admin - it will be obvious to you which one it is.
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

 

 

Similar Threads

  1. Parse error: syntax error, unexpected $end in
    By holster1 in forum General Questions
    Replies: 1
    Last Post: 23 Aug 2012, 05:19 AM
  2. Replies: 10
    Last Post: 4 Nov 2010, 09:40 PM
  3. syntax error, unexpected $end in admin english.php
    By botanarchy in forum General Questions
    Replies: 2
    Last Post: 10 Dec 2009, 12:27 PM
  4. Parse error: syntax error, unexpected $end
    By technicallynorth in forum General Questions
    Replies: 14
    Last Post: 15 Nov 2009, 08:08 AM
  5. Replies: 4
    Last Post: 30 Aug 2009, 09:26 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