tiG Posted February 28, 2006 Posted February 28, 2006 I'm not really sure where to start but customers are not able to do anything but set up an account and then they can't get past that. here are the Sessions settings, are these right?? SessionsTitleValueSession Directory/tmp Force Cookie Use False Check SSL Session ID False Check User Agent False Check IP Address True Prevent Spider Sessions False Recreate Session False
211655 Posted March 1, 2006 Posted March 1, 2006 should be Session Directory /empty Force Cookie Use False Check SSL Session ID False Check User Agent False Check IP Address False Prevent Spider Sessions True Recreate Session True 211655 SEO Optimization Export Orders into CSV file
tiG Posted March 1, 2006 Author Posted March 1, 2006 if I put anything besides /tmp (I tried /empty and / just to make sure I knew what you were saying) in that first line I get these headers: Warning: session_save_path(): open_basedir restriction in effect. File(/) i not within the allowed path(s): (.../usr/lib/php:/usr/local/lib/php:/tmp) in ...public_html/catalog/admin/includes/functions/sessions.php on line 110 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at ...public_html/catalog/admin/includes/functions/sessions.php:110) in ...public_html/catalog/admin/includes/functions/sessions.php on line 67 Warning: Cannot modify header information - headers already sent by (output started at ...public_html/catalog/admin/includes/functions/sessions.php:110) in .../catalog/admin/includes/functions/general.php on line 34
211655 Posted March 1, 2006 Posted March 1, 2006 please post ur session.php file here. u have blank spaces before first <?php or after last ?>. also post ur session details now after my suggestions. make sure the first directory is writable. 776 or 777 211655 SEO Optimization Export Orders into CSV file
tiG Posted March 2, 2006 Author Posted March 2, 2006 please post ur session.php file here. u have blank spaces before first <?php or after last ?>. also post ur session details now after my suggestions. make sure the first directory is writable. 776 or 777 I did change the properties to 777, but it still didn't take. here is the file. and thanks for helping!!! <?php /* $Id: sessions.php,v 1.19 2003/07/02 22:10:34 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions [url="http://www.oscommerce.com/"]http://www.oscommerce.com[/url] Copyright (c) 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); } } ?>
AlanR Posted March 2, 2006 Posted March 2, 2006 if I put anything besides /tmp (I tried /empty and / just to make sure I knew what you were saying) in that first line I get these headers: Warning: session_save_path(): open_basedir restriction in effect. File(/) i not within the allowed path(s): (.../usr/lib/php:/usr/local/lib/php:/tmp) in ...public_html/catalog/admin/includes/functions/sessions.php on line 110 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at ...public_html/catalog/admin/includes/functions/sessions.php:110) in ...public_html/catalog/admin/includes/functions/sessions.php on line 67 Warning: Cannot modify header information - headers already sent by (output started at ...public_html/catalog/admin/includes/functions/sessions.php:110) in .../catalog/admin/includes/functions/general.php on line 34 See: http://www.oscommerce.com/forums/index.php?showtopic=184484 Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)
tiG Posted March 2, 2006 Author Posted March 2, 2006 if I put in tmp instead of /tmp, I get lots more errors. :(
AlanR Posted March 2, 2006 Posted March 2, 2006 Go back to the thread I linked and apply the later solutions. Make sure you're saving sessions in mysql (last line in the configure.php files). Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)
Recommended Posts
Archived
This topic is now archived and is closed to further replies.