close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Troubleshooting the Headers Already Sent PHP Error

Thread began 3/03/2011 11:10 am by Jason Byrnes | Last modified 8/10/2018 3:22 am by Jason Byrnes | 15172 views | 9 replies

James L

headers already sent error

I've checked for spaces at beginning of lines in my index.php file. Checked Dreamweaver items 1) and 2),
I still get this error message:

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /Applications/MAMP/htdocs/ProRes_from_Bill/TMP6WT0WISSBX.php:5) in /Applications/MAMP/htdocs/ProRes_from_Bill/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 /Applications/MAMP/htdocs/ProRes_from_Bill/TMP6WT0WISSBX.php:5) in /Applications/MAMP/htdocs/ProRes_from_Bill/WA_eCart/WA_eCart_Definition_PHP.php on line 465

If I go to WA_eCart_Definition_PHP, line 465 looks OK. This what that whole section looks like:

//Session Storage Functions
function Session_SaveCart() {
if (!session_id()) session_start();
$theCartString = "";
for ($n=0; $n<sizeof($this->Items); $n++) {
$countIt = 0;
if ($n!=0) {
$theCartString .= "§";
foreach ($this->Items[$n] as $m) {
if ($countIt != 0) $theCartString .= "|WAECART|";
$theCartString .= $m;
$_SESSION[$this->CartName."_Items"] = $theCartString;
function Session_GetContent() {
if (!session_id()) session_start();
$retArray = array();
if (isset($_SESSION[$this->CartName."_Items"]) && $_SESSION[$this->CartName."_Items"] != "") {
$theCartString = $_SESSION[$this->CartName."_Items"];
$theItemArray = explode("§",$theCartString);
for ($x=0; $x<sizeof($theItemArray); $x++) {
$theValueArray = explode("|WAECART|",$theItemArray[$x]);
$toExec = "new ".$this->CartName. "_ItemDefinition(";
for ($y=0; $y<sizeof($theValueArray); $y++) {
if ($y != 0) $toExec.=", ";
$toExec .= '"'.str_replace("\'","'",addslashes($theValueArray[$y])).'"';
eval("\$nextItem =".$toExec.");");
$retArray[sizeof($retArray)] = $nextItem;
return $retArray;

I'll attach a screen capture so you can see the line numbers...

Please help :)

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





Ease of use


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