Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Page that does not start with <?php...


Guest

Recommended Posts

I try to change the design of OSC by using a Dreamweaver template.

Then, I can easly adapt OSC layout to my site one. That works well !

 

The problem is that Dreamweaver add a :

 

<!-- InstanceBegin template="/Templates/shop.dwt.php"

 

on the first line of everypage.

 

Then... I get the famous:

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/mirshoco/public_html/catalog/account.php:3) in /home/mirshoco/public_html/catalog/includes/functions/sessions.php on line 67

 

because the first caracter is not <?php anymore :shock:

And I cannot change it otherwise the template doesn't work anymore... I tried to put this <!-- InstanceBegin template="/Templates/shop.dwt.php" in different other places in the document and to # it, but no, no no no... Dreamweaver or PHP is not happy.

 

Is there a way to solve that ?

 

Thanks in advance

Link to comment
Share on other sites

thanks but it's not the problem unfortunately. It would be too easy.

I tried to remove the dreamweaver tag on the first line and I don't have the problem anymore if I do so... but it's not my goal if I still want to use the Template functions :wink:

 

Here is an example (account.php using shop.dwt.php as template):

 

<!-- InstanceBegin template="/Templates/shop.dwt.php" codeOutsideHTMLIsLocked="true" -->

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

<?php

/*

$Id: account.php,v 1.58 2003/02/13 01:58:22 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

require('includes/application_top.php');

 

if (!tep_session_is_registered('customer_id')) {

$navigation->set_snapshot();

tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));

}

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ACCOUNT);

 

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_ACCOUNT, '', 'SSL'));

?>

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html <?php echo HTML_PARAMS; ?>>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">

<title><?php echo TITLE; ?></title>

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">

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

<link href="../css/mirra_general.css" rel="stylesheet" type="text/css">

</head>

 

<!-- InstanceEndEditable -->

<body>

<table border="0" align="center" cellpadding="0" cellspacing="0" class="tablemain">

<tr>

<td rowspan="5" align="left" valign="top"><span id="Layer1" style="position:relative; width:120px; height:115px; z-index:1; left: 36px; top: 389px; visibility: inherit;">

<? require(DIR_WS_LANGUAGES . $language . '/menuvert.php'); ?>

</span></td>

<td height="48">

<div align="center"><br>

<img src="../images/logo.jpg" width="141" height="77"><br>

<br>

</div></td><td> </td>

</tr>

<tr>

<td height="26"><!-- InstanceBeginEditable name="language" -->

<div align="right"><a href="../fr"></a></div>

 

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">

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

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

<td> </td>

</tr>

<tr>

<td width="571" height="77"><div align="right">

<p> </p>

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

<div align="center">

<p> <!-- header //-->

<?php require(DIR_WS_INCLUDES . 'header.php'); ?>

<!-- header_eof //-->

<!-- body //-->

</p>

</div>

<!-- InstanceEndEditable --></div>

</td>

<td width="3"> </td>

</tr>

 

<tr>

<td align="left" valign="top"><!-- InstanceBeginEditable name="main" -->

<table width="100%" border="0" align="center" cellpadding="5">

<tr>

<td width="490" align="left" valign="top" class="textmain"><table border="0" width="100%" cellspacing="3" cellpadding="3">

<tr>

<!-- body_text //-->

<td width="95%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

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

<tr>

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_account.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

</tr>

</table>

</td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td>

<?php

$is_read_only = true;

 

$account_query = tep_db_query("select c.customers_gender, c.customers_firstname, c.customers_lastname, c.customers_dob, c.customers_email_address, a.entry_company, a.entry_street_address, a.entry_suburb, a.entry_postcode, a.entry_city, a.entry_zone_id, a.entry_state, a.entry_country_id, c.customers_telephone, c.customers_fax, c.customers_newsletter from " . TABLE_CUSTOMERS . " c, " . TABLE_ADDRESS_BOOK . " a where c.customers_id = '" . $customer_id . "' and a.customers_id = c.customers_id and a.address_book_id = '" . $customer_default_address_id . "'");

$account = tep_db_fetch_array($account_query);

 

require(DIR_WS_MODULES . 'account_details.php');

?>

</td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

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

<tr>

<td align="center" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_ADDRESS_BOOK, '', 'SSL') . '">' . tep_image_button('button_address_book.gif', IMAGE_BUTTON_ADDRESS_BOOK) . '</a>'; ?></td>

<td align="center" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL') . '">' . tep_image_button('button_history.gif', IMAGE_BUTTON_HISTORY) . '</a>'; ?></td>

</tr>

<tr>

<td align="center" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_NOTIFICATIONS, '', 'SSL') . '">' . tep_image_button('button_notifications.gif', IMAGE_BUTTON_NOTIFICATIONS) . '</a>'; ?></td>

<td align="center" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT_EDIT, '', 'SSL') . '">' . tep_image_button('button_edit_account.gif', IMAGE_BUTTON_EDIT_ACCOUNT) . '</a>'; ?></td>

</tr>

</table>

</td>

</tr>

</table>

</td>

<!-- body_text_eof //-->

<td width="3%" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

<!-- right_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>

<!-- right_navigation_eof //-->

</table>

</td>

</tr>

</table></td>

</tr>

</table>

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

<td> </td>

</tr>

<tr>

<td>  </td>

<td> </td>

</tr>

<tr>

<td align="left" valign="top" class="tablew">

<? require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT); ?>

</td>

<td>

 

<div align="center"></div>

<p align="center">

<!-- body_eof //-->

<!-- footer //-->

<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>

<!-- footer_eof //-->

</td>

<td> </td>

</tr>

<tr>

<td width="126" align="left" valign="top" class="tablesw"> </td>

<td><p align="center"><img src="../images/fleurrond.gif" width="44" height="43"></p>

<p align="center" class="title1"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">© Mirrafleur

2002-2003</font></p>

</td>

<td> </td>

</tr>

</table>

</body>

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

<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

 

You can check, there are no empty space ;-)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...