Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Categories from another shop in my shop when cooky


jorgemirat

Recommended Posts

I'm getting a very strange error.

 

When I turn on force cookies for the sessions (so I don't get the uggly session id in the URL), my shop shows the categories for another shop hosted in the same server where I'm hosted!!! (shared hosting oviously).

 

Before you ask, I have STORE_SESSIONS set to mysql, I have checked the table SESSIONS in the database and it contains entries so it seems to be using it. What fuzzles me is that if I change the sessions directory to a non existing directory sessions don't work! If they are stored in mysql, why does it need the tmp dir for sessions?

 

I suspect that some how, some where, the code is taking the sessions from the /tmp directory and not from mysql and this probably is why I'm getting the categories from another shop... but not sure if this is the problem.

 

Has anyone experienced something similar and know how to solve it?

 

Does anyone have a clue of what might be happening?

 

Many thanks!

 

Jorge.

Jorge

Link to comment
Share on other sites

no one knows????

 

up!

 

I'm getting a very strange error.

 

When I turn on force cookies for the sessions (so I don't get the uggly session id in the URL), my shop shows the categories for another shop hosted in the same server where I'm hosted!!! (shared hosting oviously).

 

Before you ask, I have STORE_SESSIONS set to mysql, I have checked the table SESSIONS in the database and it contains entries so it seems to be using it. What fuzzles me is that if I change the sessions directory to a non existing directory sessions don't work! If they are stored in mysql, why does it need the tmp dir for sessions?

 

I suspect that some how, some where, the code is taking the sessions from the /tmp directory and not from mysql and this probably is why I'm getting the categories from another shop... but not sure if this is the problem.

 

Has anyone experienced something similar and know how to solve it?

 

Does anyone have a clue of what might be happening?

 

Many thanks!

 

Jorge.

Jorge

Link to comment
Share on other sites

When I turn on force cookies for the sessions (so I don't get the uggly session id in the URL), my shop shows the categories for another shop hosted in the same server where I'm hosted!!! (shared hosting oviously).

 

You won't get the "uggly session id" in the url if your config file has the correct cookie settings. It'll go away after a few clicks.

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)

Link to comment
Share on other sites

You won't get the "uggly session id" in the url if your config file has the correct cookie settings. It'll go away after a few clicks.

 

My site is on aporvino.net (non-live yet) and this is my configure.php. What do you mean by to have "the correct cookie settings"?

 

Thanks.

 

Jorge.

 

// Define the webserver and path parameters

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

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

define('HTTP_SERVER', 'http://aporvino.net');

define('HTTPS_SERVER', 'https://aporvino.net');

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

define('HTTP_COOKIE_DOMAIN', 'http://aporvino.net');

define('HTTPS_COOKIE_DOMAIN', 'https://aporvino.net');

define('HTTP_COOKIE_PATH', '/');

define('HTTPS_COOKIE_PATH', '/');

define('DIR_WS_HTTP_CATALOG', '/comprar_vino/');

define('DIR_WS_HTTPS_CATALOG', '/comprar_vino/');

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

define('DIR_WS_ICONS', '/comprar_vino/icons/');

//JORGE 20050807

define('DIR_WS_IMAGES_CATALOG', '/comprar_vino/images/catalogos/');

define('DIR_WS_IMAGES_CATALOG_NOROOT', '/images/catalogos/');

//

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');

define('DB_SERVER_USERNAME', 'removed');

define('DB_SERVER_PASSWORD', 'removed');

define('DB_DATABASE', 'removed');

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

define('STORE_SESSIONS', 'mysql');

Jorge

Link to comment
Share on other sites

Just in case someone think the problem is on the cookies domain configuration, this is the current configure.php file (a section) and the issue is still happening.

 

define('HTTP_SERVER', 'http://www.aporvino.net');

define('HTTPS_SERVER', 'https://www.aporvino.net');

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

define('HTTP_COOKIE_DOMAIN', '');

define('HTTPS_COOKIE_DOMAIN', 'https://www.aporvino.net');

define('HTTP_COOKIE_PATH', '/');

define('HTTPS_COOKIE_PATH', '/');

define('DIR_WS_HTTP_CATALOG', '/comprar_vino/');

define('DIR_WS_HTTPS_CATALOG', '/comprar_vino/');

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

define('DIR_WS_ICONS', '/comprar_vino/icons/');

 

You can go to www.aporvino.net and see how the categories don't appear and the "manufacturers" are from another shop (if you select one it will take you to the other shop!)

 

Ideas????

Jorge

Link to comment
Share on other sites

define('HTTP_COOKIE_DOMAIN', 'www.aporvino.net');

define('HTTPS_COOKIE_DOMAIN', 'www.aporvino.net'); //but only if you have purchased and installed a full SSL certificate

 

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

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

 

Vger

Link to comment
Share on other sites

These are supposed to be domains not urls.

 

define('HTTP_COOKIE_DOMAIN', 'http://aporvino.net');

define('HTTPS_COOKIE_DOMAIN', 'https://aporvino.net');

 

make them:

 

define('HTTP_COOKIE_DOMAIN', 'aporvino.net');

define('HTTPS_COOKIE_DOMAIN', 'aporvino.net');

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)

Link to comment
Share on other sites

I had the enable_ssl off already.

 

I have set

 

define('HTTP_COOKIE_DOMAIN', 'aporvino.net');

 

as recommended and still the same.

 

What I don't understand is why I get the categories box and the manufacturers drop down from another shop but the rest of my shop works fine!!!

 

May be with that clue someone can find the issue????

 

Jorge.

Jorge

Link to comment
Share on other sites

Setting 'Use Cache' to false will solve this problem. Some servers, especially those running php in Safe Mode will only allow you to use the central 'tmp' folder for sessions and caching.

 

Vger

Link to comment
Share on other sites

And cannot I move the cache to another folder? I tried but I don't know how

 

Any ideas?

 

Turning off cache made the trick! Thanks.

 

What is the performance impact on turning it off? is it fine to leave it off?

 

If I want to specify another folder, where should I place it? That is, the /tmp specified now is probably above "my" folder in the server, so to move it to "my" folder in the server how should it look? (examples)

 

Thanks,

 

Jorge.

Jorge

Link to comment
Share on other sites

tmp/ should work if you place the folder in the root of your web, unless your host has restrictions on where it can be located. If that doesn't work you can specify the full path e.g. /var/www/html/tmp/

 

Vger

Link to comment
Share on other sites

tmp/ should work if you place the folder in the root of your web, unless your host has restrictions on where it can be located.  If that doesn't work you can specify the full path e.g. /var/www/html/tmp/

 

Vger

 

I changed both the cache folder and the sessions folder (even though I have set sotre_sessions=mysql) to /home/aporvino/cache (I had to give it 777). This made the manufacturers drop down to work (good!) but the categories is still not working. it doesn't appear :-(

 

If I go to the cache folder there are some sessions files (why if I have store mysql?) and there is no cache files. I go to Tools->cache and there it says that there are no files for manufacturers or categories.

 

Why is happening? any clue?

 

Jorge.

Jorge

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...