Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

installation issues - Session directory is not exist


kelvintoo

Recommended Posts

hi all,

 

When i installed the oscommerce, after installation i open up the webpage, it show error message above:

 

Warning: The sessions directory does not exist: /tmp. Sessions will not work until this directory is created.

 

how to solve this problems?

what do you mean on session directory is not exist?

 

Thanks...

Kelvin Too

Link to comment
Share on other sites

Go to catalog/includes/configure.php and set the sessions variable (the last define) like this

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

also in admin/includes/configure.php set it the same way there.

My Contributions

 

Stylesheet With Descriptions Glassy Grey Boxtops Our Products Meta Tags On The Fly

Password Protect Admin

"No matter where you go....There you are" - Buccaroo Bonsai

Link to comment
Share on other sites

Go to catalog/includes/configure.php and set the sessions variable (the last define) like this

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

also in admin/includes/configure.php set it the same way there.

 

 

Thanks sir,

 

I finally solve the problems...

 

 

Yahoooooooooo

Kelvin Too

Link to comment
Share on other sites

Go to catalog/includes/configure.php and set the sessions variable (the last define) like this

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

also in admin/includes/configure.php set it the same way there.

 

 

hi Sir,

 

I log in to oscommerce webpage is ok, but when go to admin for configuration - it pop up another errors.

 

Can you please give advice on that?

 

Thanks..

 

 

Warning: session_start() [function.session-start]: open(/tmp\sess_994494d653bbb63fdb977c84f442d096, O_RDWR) failed: No such file or directory (2) in D:\xampp\htdocs\oscommerce\admin\includes\functions\sessions.php on line 67

 

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at D:\xampp\htdocs\oscommerce\admin\includes\functions\sessions.php:67) in D:\xampp\htdocs\oscommerce\admin\includes\functions\sessions.php on line 67

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at D:\xampp\htdocs\oscommerce\admin\includes\functions\sessions.php:67) in D:\xampp\htdocs\oscommerce\admin\includes\functions\sessions.php on line 67

Kelvin Too

Link to comment
Share on other sites

Did you make the same changes to admin/includes/configure.php? If not then you need to change that one also.

 

Will change tonight and then update you accordingly.

 

thanks...

 

By the way, why it keep asking me to create a tmp folder?

Do you know what is the function of it ?

 

How to create that one and where should i put it ?

 

Thanks....

Kelvin Too

Link to comment
Share on other sites

If you store them in mysql as in the edits above you do not need to create it.

 

Hi sir,

 

These are my settings, those that highlighted in bold and red colour is the error source in line 67.

 

here the code = "

 

function tep_session_start() {

return session_start();

 

 

 

 

Please advice me what to do on it.

 

thanks...

 

 

<?php

/*

$Id: sessions.php,v 1.9 2003/06/23 01:20:05 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) {

$qid = tep_db_query("select value from " . TABLE_SESSIONS . " where sesskey = '" . tep_db_input($key) . "' and expiry > '" . time() . "'");

 

$value = tep_db_fetch_array($qid);

if ($value['value']) {

return $value['value'];

}

 

return false;

}

 

function _sess_write($key, $val) {

global $SESS_LIFE;

 

$expiry = time() + $SESS_LIFE;

$value = $val;

 

$qid = tep_db_query("select count(*) as total from " . TABLE_SESSIONS . " where sesskey = '" . tep_db_input($key) . "'");

$total = tep_db_fetch_array($qid);

 

if ($total['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) {

return session_register($variable);

}

 

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 ($sessid != '') {

return session_id($sessid);

} else {

return session_id();

}

}

 

function tep_session_name($name = '') {

if ($name != '') {

return session_name($name);

} else {

return session_name();

}

}

 

function tep_session_close() {

if (function_exists('session_close')) {

return session_close();

}

}

 

function tep_session_destroy() {

return session_destroy();

}

 

function tep_session_save_path($path = '') {

if ($path != '') {

return session_save_path($path);

} else {

return session_save_path();

}

}

?>

Kelvin Too

Link to comment
Share on other sites

If you store them in mysql as in the edits above you do not need to create it.

 

Hi sir,

 

I have solved my problems.

I just point the session to mysql instead of files then everything is ok.

btw, would like to say thanks to you.... :lol:

Kelvin Too

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...