close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

At the end of the order complete/success page i get "headers cannot be sent"

Thread began 10/05/2010 11:54 am by sam308940 | Last modified 10/06/2010 6:57 am by Jason Byrnes | 1421 views | 5 replies |

sam308940

At the end of the order complete/success page i get "headers cannot be sent"

Hi

everthing si workingg, but at the bottom fo the success/complete page i get the error that the headers cannot be sent.

THIS IS THE BOTTOM CODE ON THE SUCCESS PAGE
<?php
// Initialize the session.
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 (isset($_COOKIE[session_name()])) {
setcookie(session_name(), '', time()-42000, '/');
}

// Finally, destroy the session.
session_destroy();
?>


AND JUST IN CASE - THIS IS THE TOP INFO
<?php
//WA eCart Include
require_once("WA_eCart/boogie_PHP.php");
?><?php
$boogie->GetContent();
?>
<?php
if ($boogie->IsEmpty()) {
$boogie->redirStr = "cart_view.php";
$boogie->cartAction = "RedirectIfEmpty";
}
?>
<?php
// WA eCart Redirect
if ($boogie->redirStr != "") {
header("Location: ".$boogie->redirStr);
}
?>




Im hoping somene knows what is causing this.

Sign in to reply to this post

Jason ByrnesWebAssist

in the error message it will say:
output started by /path/to/page/casing/error.php:4

this is the key to tell you what to look for.

the number after the ":" is the line number. Look in the page that the error is stating is causing the output around the line number being reported. what is the code 3 lines before to 3 lines after the reported line?

Sign in to reply to this post

sam308940

ERROR MESSAGE

Warning: Cannot modify header information - headers already sent by (output started at /home/content/22/6698322/html/cart_complete.php:22) in /home/content/22/6698322/html/cart_complete.php on line 278



LINE 19-25 (line 22 is the metata keywords)
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/main.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="bear blanket, teddy bear blanket, customizable bear blanket, personalized bear blanket, custom blanket, personalized blanket, toddler blanket, kid blanket, kids blanket, personalizable blanket, customizable blanket, whimsical bear blanket" />
<meta name="description" content="Customize and personalize this handmade teddy bear blanket for babies, toddlers and kids." />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Boogie Baby :: Customized and personalized handmade blankets for babies, toddlers and kids.</title>

LINE 278 is
setcookie(session_name(), '', time()-42000, '/');

Sign in to reply to this post

Jason ByrnesWebAssist

change line 278 to:

@setcookie(session_name(), '', time()-42000, '/');

Sign in to reply to this post

sam308940

You guys are the best! that worked!
thank you thank you thank you !!!!!

Sign in to reply to this post

Jason ByrnesWebAssist

excellent, glad to hear it is working.

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...