Jump to content


Corporate Sponsors


Latest News: (loading..)

Getting this error - driving me mad .


  • You cannot reply to this topic
5 replies to this topic

#1 filmcell

  • Community Member
  • 103 posts
  • Real Name:bob smith

Posted 06 April 2010, 13:16

I installed the latest worldpay update AKA http://addons.oscommerce.com/info/7151

But im Getting this error

Any help thanks.

Its driving me mad .

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/phefr/public_html/*****.co.uk/ext/modules/payment/worldpay/junior_callback.php:25) in /home/phefr/public_html/*****.co.uk/includes/functions/sessions.php on line 102

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/phefr/public_html/*****.co.uk/ext/modules/payment/worldpay/junior_callback.php:25) in /home/phefr/public_html/*****.co.uk/includes/functions/sessions.php on line 102

#2 geoffreywalton

  • Community Sponsor
  • 7,731 posts
  • Real Name:Geoffrey Walton
  • Gender:Male
  • Location:Norfolk, UK (close to the centre of the universe)

Posted 06 April 2010, 20:49

Look in /ext/modules/payment/worldpay/junior_callback.php and see if there are any spaces/odd text at the before the first <?php or after the last ?>.

Try this in google

site:forums.oscommerce.com Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent

Enjoy

G
Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

Virus Threat Scanner
My Contributions
Basic install answers.
Click here for Contributions / Add Ons.
UK your site.
Site Move.
Basic design info.

For links mentioned in old answers that are no longer here follow this link Useful Threads.

If this post was useful, click the Like This button over there ======>>>>>.

#3 filmcell

  • Community Member
  • 103 posts
  • Real Name:bob smith

Posted 07 April 2010, 10:24

------------------------------------------------------------------------------------------
This is setup in config.php Looks ok ..

define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'
------------------------------------------------------------------------------------------

here is a copy .. I can`t see any bad code . At the beginning or end .

<?php
/*
UPDATED 04-12-2009
Deprecated $HTTP_POST_VARS replaced with $_POST to enable callback on all platforms/php versions.
Javascript dependancy for page redirection replaced with form action otherwise Worldpay removes javascript and leaves
visitors stranded.

Updated By Pete Batin (petebuzzin in Oscommerce forums)
Original Contribution by Harald Ponce de Leon

No gaurantees are expressed in anyway, always backup and test before production usage

$Id: junior_callback.php 1807 2008-01-13 00:50:08Z hpdl $

osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

Copyright © 2008 osCommerce

Released under the GNU General Public License
*/

?>

<?php

if (isset($_POST['M_sid']) && !empty($_POST['M_sid'])) {

chdir('../../../../');
require ('includes/application_top.php');

if ($_POST['transStatus'] == 'Y') {
$pass = false;

if (isset($_POST['M_hash']) && !empty($_POST['M_hash']) && ($_POST['M_hash'] == md5($_POST['M_sid'] . $_POST['M_cid'] . $_POST['cartId'] . $_POST['M_lang'] . number_format($_POST['amount'], 2) . MODULE_PAYMENT_WORLDPAY_JUNIOR_MD5_PASSWORD))) {
$pass = true;
}

if (isset($_POST['callbackPW']) && ($_POST['callbackPW'] != MODULE_PAYMENT_WORLDPAY_JUNIOR_CALLBACK_PASSWORD)) {
$pass = false;
}

if (tep_not_null(MODULE_PAYMENT_WORLDPAY_JUNIOR_CALLBACK_PASSWORD) && !isset($_POST['callbackPW'])) {
$pass = false;
}

if ($pass == true) {
include('includes/languages/' . basename($_POST['M_lang']) . '/modules/payment/worldpay_junior.php');

$order_query = tep_db_query("select orders_status, currency, currency_value from " . TABLE_ORDERS . " where orders_id = '" . (int)$_POST['cartId'] . "' and customers_id = '" . (int)$_POST['M_cid'] . "'");
if (tep_db_num_rows($order_query) > 0) {
$order = tep_db_fetch_array($order_query);

if ($order['orders_status'] == MODULE_PAYMENT_WORLDPAY_JUNIOR_PREPARE_ORDER_STATUS_ID) {
$order_status_id = (MODULE_PAYMENT_WORLDPAY_JUNIOR_ORDER_STATUS_ID > 0 ? (int)MODULE_PAYMENT_WORLDPAY_JUNIOR_ORDER_STATUS_ID : (int)DEFAULT_ORDERS_STATUS_ID);

tep_db_query("update " . TABLE_ORDERS . " set orders_status = '" . $order_status_id . "', last_modified = now() where orders_id = '" . (int)$_POST['cartId'] . "'");

$sql_data_array = array('orders_id' => $_POST['cartId'],
'orders_status_id' => $order_status_id,
'date_added' => 'now()',
'customer_notified' => '0',
'comments' => 'WorldPay: Transaction Verified');

tep_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array);

if (MODULE_PAYMENT_WORLDPAY_JUNIOR_TESTMODE == 'True') {
$sql_data_array = array('orders_id' => $_POST['cartId'],
'orders_status_id' => $order_status_id,
'date_added' => 'now()',
'customer_notified' => '0',
'comments' => MODULE_PAYMENT_WORLDPAY_JUNIOR_TEXT_WARNING_DEMO_MODE);

tep_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array);
}
?>
<style>
.pageHeading {
font-family: Verdana, Arial, sans-serif;
font-size: 20px;
font-weight: bold;
color: #9a9a9a;
}

.main {
font-family: Verdana, Arial, sans-serif;
font-size: 11px;
line-height: 1.5;
}
</style>

<p class="pageHeading"><?php echo STORE_NAME; ?></p>

<p class="main" align="center"><?php echo MODULE_PAYMENT_WORLDPAY_JUNIOR_TEXT_SUCCESSFUL_TRANSACTION; ?></p>

<meta http-equiv="refresh" content="0; url=<?php echo tep_href_link(FILENAME_CHECKOUT_PROCESS, tep_session_name() . '=' . $_POST['M_sid'] . '&hash=' . $_POST['hash'], 'SSL', false); ?>">

<form action="<?php echo tep_href_link(FILENAME_CHECKOUT_PROCESS, tep_session_name() . '=' . $_POST['M_sid'] . '&hash=' . $_POST['M_hash'], 'SSL', false); ?>" method="post">
<div align="center">
<input name="submit" type="submit" value="<?php echo sprintf(MODULE_PAYMENT_WORLDPAY_JUNIOR_TEXT_CONTINUE_BUTTON, addslashes(STORE_NAME)); ?>" />
</div>
</form>

<p>&nbsp;</p>

<WPDISPLAY ITEM=banner>
<?php
}
}
}
}else{
include('includes/languages/' . basename($_POST['M_lang']) . '/modules/payment/worldpay_junior.php');
?>
<style>
.pageHeading {
font-family: Verdana, Arial, sans-serif;
font-size: 20px;
font-weight: bold;
color: #9a9a9a;
}

.main {
font-family: Verdana, Arial, sans-serif;
font-size: 11px;
line-height: 1.5;
}
</style>

<p align="center" class="pageHeading"><?php echo STORE_NAME; ?></p>

<p class="main" align="center"><?php echo MODULE_PAYMENT_WORLDPAY_JUNIOR_TEXT_UNSUCCESSFUL_TRANSACTION;?></p>

<meta http-equiv="refresh" content="0; url=<?php echo tep_href_link(FILENAME_CHECKOUT_PROCESS, tep_session_name() . '=' . $_POST['M_sid'] . '&hash=' . $_POST['hash'], 'SSL', false); ?>">

<form action="<?php echo tep_href_link(FILENAME_CHECKOUT_PAYMENT, tep_session_name() . '=' . $_POST['M_sid'] . '&hash=' . $_POST['M_hash'], 'SSL', false); ?>" method="post">
<div align="center">
<input name="submit" type="submit" value="<?php echo sprintf(MODULE_PAYMENT_WORLDPAY_JUNIOR_TEXT_CONTINUE_BUTTON, addslashes(STORE_NAME)); ?>" />
</div>
</form>
<p align="center">&nbsp;</p>

<div align="center">
<WPDISPLAY ITEM=banner>
</div>
<?php
}
}
?>

#4 spooks

  • Community Member
  • 7,017 posts
  • Real Name:Sam
  • Gender:Male
  • Location:UK

Posted 07 April 2010, 13:52

Geoffrey was saying if there is anything at all b4 the first <?php you will get that issue, ie whitespace at start/end of file, often created when editing file or by some 'bad' editors. The inbuilt editor in filemanager can cause this, do not use it & remove it.


Sam

Remember, What you think I ment may not be what I thought I ment when I said it.

Contributions:


Auto Backup your Database, Easy way

Multi Images with Fancy Pop-ups, Easy way

Products in columns with multi buy etc etc

Disable any Category or Product, Easy way

Secure & Improve your account pages et al.

#5 filmcell

  • Community Member
  • 103 posts
  • Real Name:bob smith

Posted 08 April 2010, 11:49

ahh, thanks , Did that . Works now . But still no call back.

Still sits at the worldpay page. Does not return back to website.

And sits in Preparing [WorldPay] in my shop.

-----------------------------------------------

Thank You.
Thank you, your payment was successful
Merchant's Reference: *****
RBS WorldPay Transaction ID: **************
Please contact RBS WorldPay immediately if there has been a problem making your payment.
For further information about Verified By Visa authentication and details on how you can enrol, visit http://www.visaeurope.com/merchant/handlingvisapayments/cardnotpresent/verifiedbyvisa.jsp. Verified By Visa

Edited by filmcell, 08 April 2010, 11:50.


#6 cheetwood

  • Community Member
  • 4 posts
  • Real Name:Al
  • Gender:Male

Posted 19 October 2011, 10:30

after fixing your issue you state WorldPay is not returning to your site. I have this issue also. Did you resolve it?

Cheers