Jump to content

Session Start Error Message


Guest sparrowdog

Recommended Posts

Guest sparrowdog

I successfully upgraded from 3.0.2 to 3.0.3 to 3.0.4 tonight and now I'm trying to skin the shop to look like the rest of my website.

I took a stab in the dark and took everything from the index.php file (which appears to be entirely php code - and I'm not a php programmer all, but very familiar with HTML & CSS), and pasted it in the body of my new page.

(The reason I did this is that I need all the html code and the artwork from the new page, and I need the shop to slot inside it in the body of the page. I named the file with a php extension).

When I did it, I got the following error message:

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/ndf/public_html/shop/index.php:8) in /home/ndf/public_html/shop/index.php on line 86

Line 86 is:

session_start();

Apart from this error message, the shop appears to work just fine. How do I get rid of the error message?

Link to comment
Share on other sites

Guest sparrowdog

Oops. Forgot the URL and below is the raw code.

http://www.ndfcamerahouse.com.au/shop/

Are there any detailed tutorials on how to customise the look of Cube Cart 3? I could only find one quite general article, and since I'm no PHP expert, it was not quite enough info for my little brain.

As you can see from the code, I merely shoved the old index.php's coding smack bang in the middle of the new index.php's page, and it almost works, but it's throwing up error messages.

Any answers or a point in the direction of a detailed tutorial is greatly appreciated.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

"http://www.w3.org/TR/html4/loose.dtd">

<html><!-- InstanceBegin template="/Templates/main.dwt" codeOutsideHTMLIsLocked="false" -->

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<!-- InstanceBeginEditable name="doctitle" -->

<title>NDF Camera House | Hunter St Newcastle&amp;Charlestown Square</title>

<!-- InstanceEndEditable --><link href="../stylesheet.css" rel="stylesheet" type="text/css">

<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->

</head>

<body>

<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" id="maintable">

<tr>

<td><img src="../images/logondfcamerahouse.gif" width="760" height="100"></td>

</tr>

<tr>

<td><table width="100%" border="0" cellpadding="0" cellspacing="0" id="addresstable">

<tr>

<td width="44%"><div align="left">263 Hunter Street, Newcastle - 02 4929 2700</div></td>

<td width="56%"><div align="right">Shop 21, Charlestown Square - 02 4943 6325</div></td>

</tr>

</table></td>

</tr>

<tr>

<td><table width="100%" border="0" cellpadding="0" cellspacing="0" id="nav_content">

<tr valign="top">

<td width="172" id="navigation"><ul>

<li><a href="../digitalcameras.htm">Digital Cameras</a></li>

<li><a href="../digitalslrcameras.htm">Digital SLR Cameras</a></li>

<li><a href="../filmcameras.htm">Film Cameras</a></li>

<li><a href="../filmslrcameras.htm">Film SLR Cameras</a></li>

<li><a href="../videocameras.htm">Video Cameras</a></li>

<li><a href="../flashes.htm">Flashes</a></li>

<li><a href="../lenses.htm">Lenses</a></li>

<li><a href="../film.htm">Film</a></li>

<li><a href="../bags.htm">Camera Bags</a></li>

<li><a href="../tripodsunipods.htm">Tripods &amp; Unipods</a></li>

<li><a href="../memorycards.htm">Memory Cards</a></li>

<li><a href="../accessories.htm">Accessories</a></li>

<li><a href="../printersprinting.htm">Photo Printers <br>

&amp; Photo Printing</a></li>

<li><a href="../binocularstelescopes.htm">Binoculars &amp; Telescopes</a></li>

<li><a href="../onlinecatalogue.htm">Online Catalogue</a></li>

<li><a href="../index.htm">Home </a></li>

<div align="center">

<p><span class="style1"><img src="../images/brandanigif.gif" alt="sony samsung ricoh nikon konica minolta kodak panasonic fuji film olympus pentax canon"><br>

</span><span class="smalltext">NDF Camera House is proud to be Newcastle and the Hunter Valley's premier supplier of these brands.</span></p>

</div>

</ul></td>

<td width="588"><h1><!-- InstanceBeginEditable name="page heading" -->Online Catalogue<!-- InstanceEndEditable --></h1>

<table width="100%" border="0" cellpadding="10" cellspacing="0" id="content">

<tr>

<td><!-- InstanceBeginEditable name="content" --><?php

/*

+--------------------------------------------------------------------------

| CubeCart v3.0.3

| ========================================

| by Alistair Brookbanks

| CubeCart is a Trade Mark of Devellion Limited

| © 2005 Devellion Limited

| Devellion Limited,

| Westfield Lodge,

| Westland Green,

| Little Hadham,

| Nr Ware, HERTS.

| SG11 2AL

| UNITED KINGDOM

| http://www.devellion.com

| UK Private Limited Company No. 5323904

| ========================================

| Web: http://www.cubecart.com

| Date: Thursday, 22 September 2005

| Email: info (at) cubecart (dot) com

| License Type: CubeCart is NOT Open Source Software and Limitations Apply

| Licence Info: http://www.cubecart.com/site/faq/license.php

+--------------------------------------------------------------------------

| index.php

| ========================================

| Main pages of the store

+--------------------------------------------------------------------------

*/

include_once("includes/ini.inc.php");

// FIRE UP THE SESSION

session_start();

// INCLUDE CORE VARIABLES & FUNCTIONS

include_once("includes/global.inc.php");

// check if installed

if($glob['installed']==0){

header("location: install/index.php");

exit;

} elseif((file_exists($glob['rootDir']."/install/index.php") || file_exists($glob['rootDir']."/upgrade.php") && $glob['installed']==1)){

echo "<strong>WARNING</strong> - Your store will not function until the install directory and/or upgrade.php is deleted from the server.";

exit;

}

// initiate db class

include_once("classes/db.inc.php");

$db = new db();

include_once("includes/functions.inc.php");

$config = fetchDbConfig("config");

include_once("includes/sslSwitch.inc.php");

// get session data

include_once("includes/session.inc.php");

// get exchange rates etc

include_once("includes/currencyVars.inc.php");

$lang_folder = "";

if(empty($ccUserData[0]['lang'])){

$lang_folder = $config['defaultLang'];

} else {

$lang_folder = $ccUserData[0]['lang'];

}

include_once("language/".$lang_folder."/lang.inc.php");

// require template class

include_once("classes/xtpl.php");

$body = new XTemplate ("skins/".$config['skinDir']."/styleTemplates/global/index.tpl");

if(isset($_GET['searchStr'])){

$body->assign("SEARCHSTR",$_GET['searchStr']);

} else {

$body->assign("SEARCHSTR","");

}

$body->assign("CURRENCY_VER",$currencyVer);

$body->assign("VAL_ISO",$charsetIso);

$body->assign("VAL_SKIN",$config['skinDir']);

// START MAIN CONTENT

if(isset($_GET['act'])){

switch ($_GET['act']) {

case "viewDoc":

include("includes/content/viewDoc.inc.php");

$body->assign("PAGE_CONTENT",$page_content);

break;

case "viewCat":

include("includes/content/viewCat.inc.php");

$body->assign("PAGE_CONTENT",$page_content);

break;

case "viewProd":

include("includes/content/viewProd.inc.php");

$body->assign("PAGE_CONTENT",$page_content);

break;

case "unsubscribe":

include("includes/content/unsubscribe.inc.php");

$body->assign("PAGE_CONTENT",$page_content);

break;

case "taf":

include("includes/content/tellafriend.inc.php");

$body->assign("PAGE_CONTENT",$page_content);

break;

case "login":

include("includes/content/login.inc.php");

$body->assign("PAGE_CONTENT",$page_content);

break;

case "logout":

include("includes/content/logout.inc.php");

$body->assign("PAGE_CONTENT",$page_content);

break;

case "forgotPass":

include("includes/content/forgotPass.inc.php");

$body->assign("PAGE_CONTENT",$page_content);

break;

case "account":

include("includes/content/account.inc.php");

$body->assign("PAGE_CONTENT",$page_content);

break;

case "profile":

include("includes/content/profile.inc.php");

$body->assign("PAGE_CONTENT",$page_content);

break;

case "changePass":

include("includes/content/changePass.inc.php");

$body->assign("PAGE_CONTENT",$page_content);

break;

case "newsletter":

include("includes/content/newsletter.inc.php");

$body->assign("PAGE_CONTENT",$page_content);

break;

case "dnExpire":

include("includes/content/dnExpire.inc.php");

$body->assign("PAGE_CONTENT",$page_content);

break;

default:

include("includes/content/index.inc.php");

$body->assign("PAGE_CONTENT",$page_content);

break;

}

} else {

include("includes/content/index.inc.php");

$body->assign("PAGE_CONTENT",$page_content);

}

// END MAIN CONTENT

// START META DATA

if(isset($meta)){

$body->assign("META_TITLE",$config['siteTitle'].c().$meta['siteTitle']);

$body->assign("META_DESC",$meta['metaDescription']);

$body->assign("META_KEYWORDS",$config['metaKeyWords']);

} else {

$body->assign("META_TITLE",$config['siteTitle'].c());

$body->assign("META_DESC",$config['metaDescription']);

$body->assign("META_KEYWORDS",$config['metaKeyWords']);

}

// START CONTENT BOXES

include("includes/boxes/searchForm.inc.php");

$body->assign("SEARCH_FORM",$box_content);

include("includes/boxes/session.inc.php");

$body->assign("SESSION",$box_content);

include("includes/boxes/categories.inc.php");

$body->assign("CATEGORIES",$box_content);

// END CONTENT BOXES

// parse and spit out final document

$body->parse("body");

$body->out("body");

?>

<!-- InstanceEndEditable --></td>

</tr>

</table>

</td>

</tr>

</table></td>

</tr>

<tr>

<td><table width="100%" border="0" cellpadding="5" cellspacing="0" id="footer">

<tr valign="top">

<td width="161"><div align="center">

<p class="smalltext">All information <br>

copyright 2005 <br>

<a href="http://www.ndfcamerahouse.com.au" target="_blank">NDF Camera House</a></p>

<p class="smalltext"><a href="http://www.netperceptions.com.au" target="_blank">Web site design &amp; maintenance</a> <br>

by <a href="../aboutnetperceptions" target="_blank"><br>

Net Perceptions</a></p>

<p class="smalltext">Online Catalogue maintained by <br>

NDF Camerahouse</p>

</div></td>

<td width="579"><table width="100%" border="0" cellspacing="0" cellpadding="3">

<tr>

<td width="50%"><img src="../images/shopnewcastle.jpg" width="200" height="133"></td>

<td width="50%"><div align="right"><img src="../images/shopcharlestown.jpg" width="200" height="133"></div></td>

</tr>

<tr>

<td>NDF Camera House Newcastle<br>

263 Hunter Street<br>

NEWCASTLE 2300<br>

Phone: 02 4929 2700<br>

Fax:<br>

Email: <a href="mailto:[email protected]">[email protected]</a><br> </td>

<td><div align="right">NDF Camera House Charlestown<br>

Shop 21, Charlestown Square <br>

CHARLESTOWN 2290<br>

Phone: 02 4943 6325<br>

Fax:<br>

Email: <a href="mailto:[email protected]">[email protected]</a></div></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

</table>

</body>

<!-- InstanceEnd --></html>

Link to comment
Share on other sites

Guest sparrowdog

Since there's been no reply yet, I'm being pro-active and taking a stab in the dark.

I have changed the code to what is below. Site still at the same URL - http://ndfcamerahouse.com.au/shop/index.php

I got rid of the php error messages I was getting before, but you'll notice when you view the code from the above URL, there are two sets of <head> and <body> tags. One set from my HTML coding and another from the Cube Cart php code.

Also, in IE I can see the original navigation for the site over on the left, but in Firefox, I can't see it. I'm assuming Firefox is correct.

Can someone please point me in the right direction for making the shop look exactly like the rest of the site? Even someone sending me a URL of one they completely customised and sending me the code so I can look over it would be a big help.

--- code on my index.php page ---

<?php

/*

+--------------------------------------------------------------------------

| CubeCart v3.0.3

| ========================================

| by Alistair Brookbanks

| CubeCart is a Trade Mark of Devellion Limited

| © 2005 Devellion Limited

| Devellion Limited,

| Westfield Lodge,

| Westland Green,

| Little Hadham,

| Nr Ware, HERTS.

| SG11 2AL

| UNITED KINGDOM

| http://www.devellion.com

| UK Private Limited Company No. 5323904

| ========================================

| Web: http://www.cubecart.com

| Date: Thursday, 22 September 2005

| Email: info (at) cubecart (dot) com

| License Type: CubeCart is NOT Open Source Software and Limitations Apply

| Licence Info: http://www.cubecart.com/site/faq/license.php

+--------------------------------------------------------------------------

| index.php

| ========================================

| Main pages of the store

+--------------------------------------------------------------------------

*/

include_once("includes/ini.inc.php");

// FIRE UP THE SESSION

session_start();

// INCLUDE CORE VARIABLES & FUNCTIONS

include_once("includes/global.inc.php");

// check if installed

if($glob['installed']==0){

header("location: install/index.php");

exit;

} elseif((file_exists($glob['rootDir']."/install/index.php") || file_exists($glob['rootDir']."/upgrade.php") && $glob['installed']==1)){

echo "<strong>WARNING</strong> - Your store will not function until the install directory and/or upgrade.php is deleted from the server.";

exit;

}

// initiate db class

include_once("classes/db.inc.php");

$db = new db();

include_once("includes/functions.inc.php");

$config = fetchDbConfig("config");

include_once("includes/sslSwitch.inc.php");

// get session data

include_once("includes/session.inc.php");

// get exchange rates etc

include_once("includes/currencyVars.inc.php");

$lang_folder = "";

if(empty($ccUserData[0]['lang'])){

$lang_folder = $config['defaultLang'];

} else {

$lang_folder = $ccUserData[0]['lang'];

}

include_once("language/".$lang_folder."/lang.inc.php");

// require template class

include_once("classes/xtpl.php");

$body = new XTemplate ("skins/".$config['skinDir']."/styleTemplates/global/index.tpl");

if(isset($_GET['searchStr'])){

$body->assign("SEARCHSTR",$_GET['searchStr']);

} else {

$body->assign("SEARCHSTR","");

}

$body->assign("CURRENCY_VER",$currencyVer);

$body->assign("VAL_ISO",$charsetIso);

$body->assign("VAL_SKIN",$config['skinDir']);

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

"http://www.w3.org/TR/html4/loose.dtd">

<html><!-- InstanceBegin template="/Templates/main.dwt" codeOutsideHTMLIsLocked="false" -->

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<!-- InstanceBeginEditable name="doctitle" -->

<title>NDF Camera House | Hunter St Newcastle&amp;Charlestown Square</title>

<!-- InstanceEndEditable --><link href="../stylesheet.css" rel="stylesheet" type="text/css">

<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->

</head>

<body>

<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" id="maintable">

<tr>

<td><img src="../images/logondfcamerahouse.gif" width="760" height="100"></td>

</tr>

<tr>

<td><table width="100%" border="0" cellpadding="0" cellspacing="0" id="addresstable">

<tr>

<td width="44%"><div align="left">263 Hunter Street, Newcastle - 02 4929 2700</div></td>

<td width="56%"><div align="right">Shop 21, Charlestown Square - 02 4943 6325</div></td>

</tr>

</table></td>

</tr>

<tr>

<td><table width="100%" border="0" cellpadding="0" cellspacing="0" id="nav_content">

<tr valign="top">

<td width="172" id="navigation"><ul>

<li><a href="../digitalcameras.htm">Digital Cameras</a></li>

<li><a href="../digitalslrcameras.htm">Digital SLR Cameras</a></li>

<li><a href="../filmcameras.htm">Film Cameras</a></li>

<li><a href="../filmslrcameras.htm">Film SLR Cameras</a></li>

<li><a href="../videocameras.htm">Video Cameras</a></li>

<li><a href="../flashes.htm">Flashes</a></li>

<li><a href="../lenses.htm">Lenses</a></li>

<li><a href="../film.htm">Film</a></li>

<li><a href="../bags.htm">Camera Bags</a></li>

<li><a href="../tripodsunipods.htm">Tripods &amp; Unipods</a></li>

<li><a href="../memorycards.htm">Memory Cards</a></li>

<li><a href="../accessories.htm">Accessories</a></li>

<li><a href="../printersprinting.htm">Photo Printers <br>

&amp; Photo Printing</a></li>

<li><a href="../binocularstelescopes.htm">Binoculars &amp; Telescopes</a></li>

<li><a href="../onlinecatalogue.htm">Online Catalogue</a></li>

<li><a href="../index.htm">Home </a></li>

<div align="center">

<p><span class="style1"><img src="../images/brandanigif.gif" alt="sony samsung ricoh nikon konica minolta kodak panasonic fuji film olympus pentax canon"><br>

</span><span class="smalltext">NDF Camera House is proud to be Newcastle and the Hunter Valley's premier supplier of these brands.</span></p>

</div>

</ul></td>

<td width="588"><h1><!-- InstanceBeginEditable name="page heading" -->Online Catalogue<!-- InstanceEndEditable --></h1>

<table width="100%" border="0" cellpadding="10" cellspacing="0" id="content">

<tr>

<td><!-- InstanceBeginEditable name="content" -->

<?php

// START MAIN CONTENT

if(isset($_GET['act'])){

switch ($_GET['act']) {

case "viewDoc":

include("includes/content/viewDoc.inc.php");

$body->assign("PAGE_CONTENT",$page_content);

break;

case "viewCat":

include("includes/content/viewCat.inc.php");

$body->assign("PAGE_CONTENT",$page_content);

break;

case "viewProd":

include("includes/content/viewProd.inc.php");

$body->assign("PAGE_CONTENT",$page_content);

break;

case "unsubscribe":

include("includes/content/unsubscribe.inc.php");

$body->assign("PAGE_CONTENT",$page_content);

break;

case "taf":

include("includes/content/tellafriend.inc.php");

$body->assign("PAGE_CONTENT",$page_content);

break;

case "login":

include("includes/content/login.inc.php");

$body->assign("PAGE_CONTENT",$page_content);

break;

case "logout":

include("includes/content/logout.inc.php");

$body->assign("PAGE_CONTENT",$page_content);

break;

case "forgotPass":

include("includes/content/forgotPass.inc.php");

$body->assign("PAGE_CONTENT",$page_content);

break;

case "account":

include("includes/content/account.inc.php");

$body->assign("PAGE_CONTENT",$page_content);

break;

case "profile":

include("includes/content/profile.inc.php");

$body->assign("PAGE_CONTENT",$page_content);

break;

case "changePass":

include("includes/content/changePass.inc.php");

$body->assign("PAGE_CONTENT",$page_content);

break;

case "newsletter":

include("includes/content/newsletter.inc.php");

$body->assign("PAGE_CONTENT",$page_content);

break;

case "dnExpire":

include("includes/content/dnExpire.inc.php");

$body->assign("PAGE_CONTENT",$page_content);

break;

default:

include("includes/content/index.inc.php");

$body->assign("PAGE_CONTENT",$page_content);

break;

}

} else {

include("includes/content/index.inc.php");

$body->assign("PAGE_CONTENT",$page_content);

}

// END MAIN CONTENT

// START META DATA

if(isset($meta)){

$body->assign("META_TITLE",$config['siteTitle'].c().$meta['siteTitle']);

$body->assign("META_DESC",$meta['metaDescription']);

$body->assign("META_KEYWORDS",$config['metaKeyWords']);

} else {

$body->assign("META_TITLE",$config['siteTitle'].c());

$body->assign("META_DESC",$config['metaDescription']);

$body->assign("META_KEYWORDS",$config['metaKeyWords']);

}

// START CONTENT BOXES

include("includes/boxes/searchForm.inc.php");

$body->assign("SEARCH_FORM",$box_content);

include("includes/boxes/session.inc.php");

$body->assign("SESSION",$box_content);

include("includes/boxes/categories.inc.php");

$body->assign("CATEGORIES",$box_content);

// END CONTENT BOXES

// parse and spit out final document

$body->parse("body");

$body->out("body");

?>

<!-- InstanceEndEditable --></td>

</tr>

</table>

</td>

</tr>

</table></td>

</tr>

<tr>

<td><table width="100%" border="0" cellpadding="5" cellspacing="0" id="footer">

<tr valign="top">

<td width="161"><div align="center">

<p class="smalltext">All information <br>

copyright 2005 <br>

<a href="http://www.ndfcamerahouse.com.au" target="_blank">NDF Camera House</a></p>

<p class="smalltext"><a href="http://www.netperceptions.com.au" target="_blank">Web site design &amp; maintenance</a> <br>

by <a href="../aboutnetperceptions" target="_blank"><br>

Net Perceptions</a></p>

<p class="smalltext">Online Catalogue maintained by <br>

NDF Camerahouse</p>

</div></td>

<td width="579"><table width="100%" border="0" cellspacing="0" cellpadding="3">

<tr>

<td width="50%"><img src="../images/shopnewcastle.jpg" width="200" height="133"></td>

<td width="50%"><div align="right"><img src="../images/shopcharlestown.jpg" width="200" height="133"></div></td>

</tr>

<tr>

<td>NDF Camera House Newcastle<br>

263 Hunter Street<br>

NEWCASTLE 2300<br>

Phone: 02 4929 2700<br>

Fax:<br>

Email: <a href="mailto:[email protected]">[email protected]</a><br> </td>

<td><div align="right">NDF Camera House Charlestown<br>

Shop 21, Charlestown Square <br>

CHARLESTOWN 2290<br>

Phone: 02 4943 6325<br>

Fax:<br>

Email: <a href="mailto:[email protected]">[email protected]</a></div></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

</table>

</body>

<!-- InstanceEnd --></html>

Link to comment
Share on other sites

Guest sparrowdog

I just spent a fair amount of time just looking through all the files after this, and I think I may have figured it out for myself, but if someone could confirm this for me, I'd appreciate it.

I've been changing the index.php file to put in my new graphics, navigation etc, and I'm not supposed to do that there. I'm supposed to do it in index.tpl within the global folder of the skin I'm playing with.

Is this what I'm doing wrong??? I haven't actually tried it yet as it's late here and I'm off to bed, but the little lightblumb just went off in my head and I thought some lovely person out there might confirm this for me so I can wake up in the morning and start editing the correct file :angry:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...