close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Parse error - confirm.php

Thread began 10/10/2011 6:31 pm by john421313 | Last modified 10/12/2011 9:30 am by Jason Byrnes | 710 views | 5 replies |

john421313

Parse error - confirm.php

I have tried eCart several times starting from scratch. Each time I get this error and have no idea why. Everything works fine adding static items from the form to the cart. When I checkout, I fill in the order info, then click checkout and continuously get this error.

Parse error: syntax error, unexpected '?' in C:\wamp\www\stjohnd\test_donations\confirm.php on line 99


Here is line 99 in the code. I am not a PHP expert. Any help here?


$RecipArray[$CurIndex][] = $row_<?php echo ((isset($_SESSION["eCartCheckoutForm_firstname"]))?$_SESSION["eCartCheckoutForm_firstname"]:"")


It is part of this php block below

<?php
if (!isset($_SESSION))session_start();
if ((($_SERVER["REQUEST_METHOD"] == "POST") && (isset($_SERVER["HTTP_REFERER"]) && strpos(urldecode($_SERVER["HTTP_REFERER"]), urldecode($_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"])) > 0) && isset($_POST))) {
//WA Universal Email object="mail"
set_time_limit(0);
$EmailRef = "waue_confirm_1";
$BurstSize = 1;
$BurstTime = 200;
$WaitTime = 1;
$GoToPage = "checkout_success.php";
$RecipArray = array();
$StartBurst = time();
$LoopCount = 0;
$TotalEmails = 0;
$RecipIndex = 0;
// build up recipients array
$CurIndex = sizeof($RecipArray);
$RecipArray[$CurIndex] = array();
$RecipArray[$CurIndex][] = $row_<?php echo ((isset($_SESSION["eCartCheckoutForm_firstname"]))?$_SESSION["eCartCheckoutForm_firstname"]:"") ?>

Sign in to reply to this post

Jason ByrnesWebAssist

what version of eCart are you using?

Are you using Universal Email 4 or are you using CSS Form Builder?

If you are using CSS Form Builder, make sure that you have installed CSS Form Builder 2.0.1 support release 2 that is available in the support release section of the CSS Form builder download center page, if you have a previous version installed, make sure to uninstall it from the extensions manager before installing the newer version.

after installing the Support release, delete the checkout pages and rerun the checkout wizard.

Sign in to reply to this post

john421313

I purchased the Super Suite. I am running CSS FormBuilder 2.00 and eCart 5.03. Don't know what version of Universal Email I have, since I couldn't download it separately because the web site said it was already included CSS FormBuilder.

I will try version 2.01 to see if that fixes the problem

I am not using either product, just native eCart with static fields, but perhaps FormBuilder has an update that will fix this. I will test.

Sign in to reply to this post

john421313

Just to let you know ... downloaded the CSS FormBuilder 2.0.1, support release 2. Removed old version, installed new version. Adobe Extension manager still shows version 2.0.0.

Package has a file name of CSSFormBuilder_027

Sign in to reply to this post

john421313

Jason, that seemed to fix the problem. It tested fine on my Wamp server on my PC. I then uploaded everything to the production web server and on the first page of my form where the add to cart button is, I get this error on top of the page (the error is repeated twice).


Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/stjohnd/public_html/test_donations/index.php:1) in /home/stjohnd/public_html/WA_eCart/WA_eCart_Definition_PHP.php on line 465

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/stjohnd/public_html/test_donations/index.php:1) in /home/stjohnd/public_html/WA_eCart/WA_eCart_Definition_PHP.php on line 465



I set up the ecart to use a session variable and not a cookie. Like I said, it worked fine on the test server. The only think on the test server I noticed was that after the checkout, the cart did not get deleted. I exited the browser and came back in and my cart was still in tact. I would have assumed that it would have been automatically cleared.

Sign in to reply to this post

Jason ByrnesWebAssist

see the following thread for details on troubleshooting the headers already sent error message:
showthread.php?t=19285


according to the error, the problem is at line 1 of the index page:
output started at /home/stjohnd/public_html/test_donations/index.php:1

this means either there is output to the page at line 1, or the Unicode BOM Signature is enabled


to clear the carty on checkout success, add the following code after the </html> tag on the checkout success page:

php:
<?php

// Initialize the session.
// If you are using session_name("something"), don't forget it now!
@session_start();

// Unset all of the session variables.
$_SESSION = array();

// If it's desired to kill the session, also delete the session cookie.
// Note: This will destroy the session, and not just the session data!
if (ini_get("session.use_cookies")) {
    
$params session_get_cookie_params();
   @ 
setcookie(session_name(), ''time() - 42000,
        
$params["path"], $params["domain"],
        
$params["secure"], $params["httponly"]
    );
}

// Finally, destroy the session.
@session_destroy();
?>
Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...