Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

config.php or weird bug in sessions.php???


envy2000

Recommended Posts

Posted

i have been having a really tough time getting sessions to work, so that i don't get an empty cart when i click "buy now".

 

i managed to get a single item to add to the cart is a really weird way that makes me kind of think there is a bug.

 

nothing was going in the cart, and i wasn't sure if my configure.php was correctly setup for includes/functions/sessions.php so i put an echo "hello world"; at the beginning of sessions.php. i got the echo back (plus some headers already sent errors). So i now know that the paths are correct.

 

the buggy part is that i now deleted the echo "hello world"; and refreshed and there is an item in the cart. I again can't add any others, but the item i origianlly selected is in there.

 

i am using yesterdays snapshot

php 4.2.2

cobalt server

 

 

here's my config. is it me or sessions.php??

 

 

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

define('HTTPS_SERVER', 'http://localhost'); // eg, https://localhost - should not be NULL for productive servers

define('ENABLE_SSL', false); // secure webserver for checkout procedure?

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

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

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

define('DIR_WS_INCLUDES', 'includes/'); // If "URL fopen wrappers" are enabled in PHP (which they are in the default configuration), this can be a URL instead of a local pathname

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

define('DIR_WS_FUNCTIONS', '/home/sites/site21/web/catalog/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', DIR_WS_CATALOG . 'pub/');

define('DIR_FS_DOCUMENT_ROOT', '/home/sites/site21/web/catalog/'); // where your pages are located on the server. if $DOCUMENT_ROOT doesnt suit you, replace with your local path. (eg, /usr/local/apache/htdocs)

define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG);

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

Posted

Your configure.php is mixing up a number of definitions.

 

You cannot have things spelled out specifically for so many settings and then add those settings together later on.

 

Here is an example of mine:

 

  define('HTTP_SERVER', 'http://www.thewebmakerscorner.com'); // eg, http://localhost - should not be NULL for productive servers

 define('HTTPS_SERVER', 'https://secure.sashbox.net/thewebmakerscorner.com'); // eg, https://localhost - should not be NULL for productive servers

 define('ENABLE_SSL', true); // secure webserver for checkout procedure?

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

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

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

 define('DIR_WS_INCLUDES', 'includes/'); // If "URL fopen wrappers" are enabled in PHP (which they are in the default configuration), this can be a URL instead of a local pathname

 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', DIR_WS_CATALOG . 'pub/');

//  define('DIR_FS_DOCUMENT_ROOT', $DOCUMENT_ROOT); // where your pages are located on the server. if $DOCUMENT_ROOT doesnt suit you, replace with your local path. (eg, /usr/local/apache/htdocs)

 define('DIR_FS_DOCUMENT_ROOT', '/home/webmaker/public_html'); // where your pages are located on the server. if $DOCUMENT_ROOT doesnt suit you, replace with your local path. (eg, /usr/local/apache/htdocs)

 define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG);

 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

NOTE: I do not use $DOCUMENT_ROOT that is commented out 8)

Posted

can you define 'DIR_WS_CATALOG' to a multiple folder path like this... site21/web/catalog/ ?

 

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

define('HTTPS_SERVER', 'http://localhost'); // eg, https://localhost - should not be NULL for productive servers

define('ENABLE_SSL', false); // secure webserver for checkout procedure?

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

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

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

define('DIR_WS_INCLUDES', 'includes/'); // If "URL fopen wrappers" are enabled in PHP (which they are in the default configuration), this can be a URL instead of a local pathname

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', DIR_WS_CATALOG . 'pub/');

// define('DIR_FS_DOCUMENT_ROOT', $DOCUMENT_ROOT); // where your pages are located on the server. if $DOCUMENT_ROOT doesnt suit you, replace with your local path. (eg, /usr/local/apache/htdocs)

define('DIR_FS_DOCUMENT_ROOT', '/home/sites/site21/web/catalog/'); // where your pages are located on the server. if $DOCUMENT_ROOT doesnt suit you, replace with your local path. (eg, /usr/local/apache/htdocs)

define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG);

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

Archived

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

×
×
  • Create New...