Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Problem with maintaining session


suski78

Recommended Posts

Hi!

I have problem with maintaining the session.

catalog/index.php the page download great, when I go to database, it has created a line in session table. But when I press any link, I get "page cannot be displayed" error.

 

In the configure file i have set the line

store_session to be 'mysql'.

 

Please, does somebody know solution for this?

Link to comment
Share on other sites

This is most likely a configuration error rather than session. When you get a 'page cannot be displayed' error it usually means that the link is invalid. Post your catalog/includes/configure.php (blank out the database password etc.) and we shall take a look :)

 

Matti

Link to comment
Share on other sites

<?php
/*
 $Id: configure.php,v 1.14 2003/07/09 01:15:48 hpdl Exp $

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

 Copyright (c) 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://123.456.789.0/'); // eg, http://localhost - should not be empty for productive servers
 define('HTTPS_SERVER', 'https://123.456.789.0/'); // eg, https://localhost - should not be empty for productive servers
 define('ENABLE_SSL', true); // secure webserver for checkout procedure?
 define('HTTP_COOKIE_DOMAIN', 'http://123.456.789.0/');
 define('HTTPS_COOKIE_DOMAIN', 'https://123.456.789.0//');
 define('HTTP_COOKIE_PATH', 'catalog/');
 define('HTTPS_COOKIE_PATH', 'catalog/');
 define('DIR_WS_HTTP_CATALOG', 'catalog/');
 define('DIR_WS_HTTPS_CATALOG', 'catalog/');
 define('DIR_WS_IMAGES', 'images/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 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_DOWNLOAD_PUBLIC', 'pub/');
 define('DIR_FS_CATALOG', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']));
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

// define our database connection
 define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers
 define('DB_SERVER_USERNAME', 'something');
 define('DB_SERVER_PASSWORD', 'something else');
 define('DB_DATABASE', 'oscommerce');
 define('USE_PCONNECT', 'true'); // use persistent connections?
 define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'
?>

Link to comment
Share on other sites

<?php
/*
$Id: configure.php,v 1.14 2003/07/09 01:15:48 hpdl Exp $

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

Copyright (c) 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://123.456.789.0'); // eg, http://localhost - should not be empty for productive servers
define('HTTPS_SERVER', 'https://123.456.789.0'); // eg, https://localhost - should not be empty for productive servers
define('ENABLE_SSL', false); // secure webserver for checkout procedure?
define('HTTP_COOKIE_DOMAIN', '123.456.789.0');
define('HTTPS_COOKIE_DOMAIN', '123.456.789.0');
define('HTTP_COOKIE_PATH', '/catalog/');
define('HTTPS_COOKIE_PATH', '/catalog/');
define('DIR_WS_HTTP_CATALOG', '/catalog/');
define('DIR_WS_HTTPS_CATALOG', '/catalog/');
define('DIR_WS_IMAGES', 'images/');
define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
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_DOWNLOAD_PUBLIC', 'pub/');
define('DIR_FS_CATALOG', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']));
define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

// define our database connection
define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers
define('DB_SERVER_USERNAME', 'something');
define('DB_SERVER_PASSWORD', 'something else');
define('DB_DATABASE', 'oscommerce');
define('USE_PCONNECT', 'true'); // use persistent connections?
define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

 

This should be ok.

 

I have set SSL to 'false' - you do not have a domain name yet so I assume that SSL is not yet installed :)

 

Matti

Link to comment
Share on other sites

Actually we have ssl installed but we tried you suggestion - it did'nt work.

 

We noticed that when we place 'osCsid' parameter in browser's URL with 'sesskey', it works. Any ideas where these variables are defined? Maybe it tries to search session key in wrong place (why)?

Link to comment
Share on other sites

How about a valid URL so we can see?

 

Your configuration file was definitely bung - be careful you didn't pull the 'not found' from cache :P

 

Matti

Link to comment
Share on other sites

The problem is this:

 

>> http://whatever.com/catalog/index.php

 

everything works fine. When you press any link at all, the next page will be:

 

>> http://whatever.com/catalog/product_review...2e2ae177f262a7f

 

and page will return with the normal error page "The page cannot be displayed".

 

If I change the 'osCsid' in the url to be 'sesskey' I can continue, but I have to change it manually everytime I press a link, so the problem appears to be configuration error.

 

In the database there is no field called osCsid, so I wonder, where this is suppodsed to be set to something else and linked to sesskey.

 

Are there any other configuration tasks that should be checked.

 

Thank You for your help!

Link to comment
Share on other sites

I installed the oscommerce on a different server (with php 4.3.3), no problems occured. Has anyone any experience with php 4.3.6 & oscommerce? What php.ini settings can mess this up or can they?

 

When I installed this to another server, I don't get any osCsid parameter in the url in links, but when I'm trying to install it on php 4.3.6, I have that parameter in URL, and I think it has something to do with the error too.

Link to comment
Share on other sites

  • 4 weeks later...

Archived

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

×
×
  • Create New...