Guest Posted March 31, 2006 Posted March 31, 2006 I am a newbie. (sigh) I went through testing out some features of my site. This is what I get when I try to add anything to the cart. Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at c:\hosting\webhost4life\member\olive\catalog\includes\functions\general.php:1256) in c:\hosting\webhost4life\member\olive\catalog\includes\functions\sessions.php on line 67 Warning: Cannot modify header information - headers already sent by (output started at c:\hosting\webhost4life\member\olive\catalog\includes\functions\general.php:1256) in c:\hosting\webhost4life\member\olive\catalog\includes\functions\general.php on line 29 How do I correct it? Many thanx!!
Jack_mcs Posted March 31, 2006 Posted March 31, 2006 Try this. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
Guest Posted March 31, 2006 Posted March 31, 2006 I removed the "whitespace" but it didn't fix my problem. Here is the code: <?php /* $Id: sessions.php,v 1.19 2003/07/02 22:10:34 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ if (STORE_SESSIONS == 'mysql') { if (!$SESS_LIFE = get_cfg_var('session.gc_maxlifetime')) { $SESS_LIFE = 1440; } function _sess_open($save_path, $session_name) { return true; } function _sess_close() { return true; } function _sess_read($key) { $value_query = tep_db_query("select value from " . TABLE_SESSIONS . " where sesskey = '" . tep_db_input($key) . "' and expiry > '" . time() . "'"); $value = tep_db_fetch_array($value_query); if (isset($value['value'])) { return $value['value']; } return false; } function _sess_write($key, $val) { global $SESS_LIFE; $expiry = time() + $SESS_LIFE; $value = $val; $check_query = tep_db_query("select count(*) as total from " . TABLE_SESSIONS . " where sesskey = '" . tep_db_input($key) . "'"); $check = tep_db_fetch_array($check_query); if ($check['total'] > 0) { return tep_db_query("update " . TABLE_SESSIONS . " set expiry = '" . tep_db_input($expiry) . "', value = '" . tep_db_input($value) . "' where sesskey = '" . tep_db_input($key) . "'"); } else { return tep_db_query("insert into " . TABLE_SESSIONS . " values ('" . tep_db_input($key) . "', '" . tep_db_input($expiry) . "', '" . tep_db_input($value) . "')"); } } function _sess_destroy($key) { return tep_db_query("delete from " . TABLE_SESSIONS . " where sesskey = '" . tep_db_input($key) . "'"); } function _sess_gc($maxlifetime) { tep_db_query("delete from " . TABLE_SESSIONS . " where expiry < '" . time() . "'"); return true; } session_set_save_handler('_sess_open', '_sess_close', '_sess_read', '_sess_write', '_sess_destroy', '_sess_gc'); } function tep_session_start() { return session_start(); } function tep_session_register($variable) { global $session_started; if ($session_started == true) { return session_register($variable); } else { return false; } } function tep_session_is_registered($variable) { return session_is_registered($variable); } function tep_session_unregister($variable) { return session_unregister($variable); } function tep_session_id($sessid = '') { if (!empty($sessid)) { return session_id($sessid); } else { return session_id(); } } function tep_session_name($name = '') { if (!empty($name)) { return session_name($name); } else { return session_name(); } } function tep_session_close() { if (PHP_VERSION >= '4.0.4') { return session_write_close(); } elseif (function_exists('session_close')) { return session_close(); } } function tep_session_destroy() { return session_destroy(); } function tep_session_save_path($path = '') { if (!empty($path)) { return session_save_path($path); } else { return session_save_path(); } } function tep_session_recreate() { if (PHP_VERSION >= 4.1) { $session_backup = $_SESSION; unset($_COOKIE[tep_session_name()]); tep_session_destroy(); if (STORE_SESSIONS == 'mysql') { session_set_save_handler('_sess_open', '_sess_close', '_sess_read', '_sess_write', '_sess_destroy', '_sess_gc'); } tep_session_start(); $_SESSION = $session_backup; unset($session_backup); } } ?>
Jack_mcs Posted March 31, 2006 Posted March 31, 2006 The problem is in the catalog\includes\functions\general.php file. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
Guest Posted March 31, 2006 Posted March 31, 2006 okay. I deleted the whitespace from that file too....and it didn't resolve the issue. What am I doing wrong??
ozcsys Posted March 31, 2006 Posted March 31, 2006 okay. I deleted the whitespace from that file too....and it didn't resolve the issue. What am I doing wrong?? What program are you using to edit your php files?? The Knowledge Base is a wonderful thing. Do you have a problem? Have you checked out Common Problems? There are many very useful osC Contributions Are you having trouble with a installed contribution? Have you checked out the support thread found Here BACKUP BACKUP BACKUP!!! You did backup, right??
Guest Posted March 31, 2006 Posted March 31, 2006 I am going into the files via webhosting4life.com and manually editing them.
ozcsys Posted March 31, 2006 Posted March 31, 2006 I am going into the files via webhosting4life.com and manually editing them. That may well be the problem as the online file editor may be adding the whitespaces. Try downloading the file to your local computer and editing it with notepad or get yourself a php editor( you can search for free ones via google) The Knowledge Base is a wonderful thing. Do you have a problem? Have you checked out Common Problems? There are many very useful osC Contributions Are you having trouble with a installed contribution? Have you checked out the support thread found Here BACKUP BACKUP BACKUP!!! You did backup, right??
Guest Posted April 1, 2006 Posted April 1, 2006 Okay, I have downloaded the general.php file via FTP, deleted the whitespace and uploaded it. And that did the trick! Thank YOU guys!!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.