Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Session errors pls help.


Accordinglee

Recommended Posts

Getting these errors

 

Warning: session_start(): open(/tmp\sess_497b286b508731b76722258f7fb0b3c1, O_RDWR) failed: No such file or directory (2) in C:\Web\www\catalog\includes\functions\sessions.php on line 98

 

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at C:\Web\www\catalog\includes\functions\sessions.php:98) in C:\Web\www\catalog\includes\functions\sessions.php on line 98

 

Warning: I am able to write to the configuration file: C:/Web/www/catalog/includes/configure.php. This is a potential security risk - please set the right user permissions on this file.

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

 

 

 

here is a pic of what i see:

 

sessionerror6cm.th.jpg

Link to comment
Share on other sites

My advice, don't click on the image link above. It launches popups and tries to install stuff on your computer.

 

In answer to the question, edit both configure.php files so that they read 'mysql' where indicated on the last line - thus storing sessions in the database and not in files. That will resolve all problems bar one.

 

For the permissions problem go to your web hosting control panel, locate the File Manager and use that to reset permissions on your configure.php files to 644.

 

Vger

Link to comment
Share on other sites

Vger,

 

Where would I put the "tmp" folder in the script??

 

 

 

function tep_session_start() {

// >>> BEGIN REGISTER_GLOBALS

$success = session_start();

// Work-around to allow disabling of register_globals - map all defined

// session variables

if ($success && count($_SESSION))

{

$session_keys = array_keys($_SESSION);

foreach($session_keys as $variable)

{

link_session_variable($variable, true);

}

}

 

return $success;

// <<< END REGISTER_GLOBALS

}

 

function tep_session_register($variable) {

// >>> BEGIN REGISTER_GLOBALS

// -skip- return session_register($variable);

 

// Work-around to allow disabling of register_globals - map session variable

link_session_variable($variable, true);

 

return true;

// <<< END SESSION_REGISTER

}

 

function tep_session_is_registered($variable) {

// >>> BEGIN REGISTER_GLOBALS

// return session_is_registered($variable);

return isset($_SESSION[$variable]);

// <<< END REGISTER_GLOBALS

}

 

function tep_session_unregister($variable) {

// >>> BEGIN REGISTER_GLOBALS

// Work-around to allow disabling of register_globals - unmap session variable

link_session_variable($variable, false);

unset($_SESSION[$variable]);

 

// return session_unregister($variable);

return true;

// <<< END REGISTER_GLOBALS

}

 

 

 

Note for img above:

ImgShack probably popped up msg to install it's toolbar. Just cancel it.

Link to comment
Share on other sites

scrap the post above,

were does storing session go in configure.php?

 

 

 

 

<?php

/*

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

define('HTTP_SERVER', 'http://localhost'); // eg, http://localhost - should not be empty for productive servers

define('HTTP_CATALOG_SERVER', 'http://localhost');

define('HTTPS_CATALOG_SERVER', '');

define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module

define('DIR_FS_DOCUMENT_ROOT', 'C:/Web/www/catalog/'); // where the pages are located on the server

define('DIR_WS_ADMIN', '/catalog/admin/'); // absolute path required

define('DIR_FS_ADMIN', 'C:/Web/www/catalog/admin/'); // absolute pate required

define('DIR_WS_CATALOG', '/catalog/'); // absolute path required

define('DIR_FS_CATALOG', 'C:/Web/www/catalog/'); // absolute path required

define('DIR_WS_IMAGES', 'images/');

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');

define('DIR_WS_INCLUDES', 'includes/');

define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');

define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');

define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');

define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');

define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/');

define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');

define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');

define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');

define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');

 

// define our database connection

define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', xxx);

define('DB_SERVER_PASSWORD', xxx);

define('DB_DATABASE', 'osdb1');

define('USE_PCONNECT', 'false'); // use persisstent connections?

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

?>

Link to comment
Share on other sites

OMG I'm soo blind.

 

I found it.

 

<?php

/*

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright ? 2003 osCommerce

 

Released under the GNU General Public License

*/

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

define('HTTP_SERVER', 'http://localhost'); // eg, http://localhost - should not be empty for productive servers

define('HTTP_CATALOG_SERVER', 'http://localhost');

define('HTTPS_CATALOG_SERVER', '');

define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module

define('DIR_FS_DOCUMENT_ROOT', 'C:/Web/www/catalog/'); // where the pages are located on the server

define('DIR_WS_ADMIN', '/catalog/admin/'); // absolute path required

define('DIR_FS_ADMIN', 'C:/Web/www/catalog/admin/'); // absolute pate required

define('DIR_WS_CATALOG', '/catalog/'); // absolute path required

define('DIR_FS_CATALOG', 'C:/Web/www/catalog/'); // absolute path required

define('DIR_WS_IMAGES', 'images/');

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');

define('DIR_WS_INCLUDES', 'includes/');

define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');

define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');

define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');

define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');

define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/');

define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');

define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');

define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');

define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');

 

// define our database connection

define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', xxx);

define('DB_SERVER_PASSWORD', xxx);

define('DB_DATABASE', 'osdb1');

define('USE_PCONNECT', 'false'); // use persisstent connections?

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

?>

Link to comment
Share on other sites

fixed it to read

 

<?php

/*

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright ? 2003 osCommerce

 

Released under the GNU General Public License

*/

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

define('HTTP_SERVER', 'http://localhost'); // eg, http://localhost - should not be empty for productive servers

define('HTTP_CATALOG_SERVER', 'http://localhost');

define('HTTPS_CATALOG_SERVER', '');

define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module

define('DIR_FS_DOCUMENT_ROOT', 'C:/Web/www/catalog/'); // where the pages are located on the server

define('DIR_WS_ADMIN', '/catalog/admin/'); // absolute path required

define('DIR_FS_ADMIN', 'C:/Web/www/catalog/admin/'); // absolute pate required

define('DIR_WS_CATALOG', '/catalog/'); // absolute path required

define('DIR_FS_CATALOG', 'C:/Web/www/catalog/'); // absolute path required

define('DIR_WS_IMAGES', 'images/');

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');

define('DIR_WS_INCLUDES', 'includes/');

define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');

define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');

define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');

define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');

define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/');

define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');

define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');

define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');

define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');

 

// define our database connection

define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', xxx);

define('DB_SERVER_PASSWORD', xxx);

define('DB_DATABASE', 'osdb1');

define('USE_PCONNECT', 'false'); // use persisstent connections?

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

?>

 

 

NOT tmp

 

now both catalog and admin tool section works

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...