Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

errror 1062 - Duplicate entry '38406e7742b2f3c92cd


kcesco

Recommended Posts

Posted

I've noticed that the message below:

1062 - Duplicate entry '38406e7742b2f3c92cd9978c4c46ace3' for key 1

 

insert into sessions values ('38406e7742b2f3c92cd9978c4c46ace3?osCAdminID=1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxa', '1117404068', 'SESSION_SSL_ID|b:0;cart|O:12:\"shoppingcart\":4:{s:8:\"contents\";a:0:{}s:5:\"total\";i:0;s:6:\"weight\";i:0;s:12:\"content_type\";b:0;}language|s:7:\"english\";languages_id|s:1:\"1\";currency|s:3:\"USD\";navigation|O:17:\"navigationhistory\":2:{s:4:\"path\";a:1:{i:0;a:4:{s:4:\"page\";s:18:\"create_account.php\";s:4:\"mode\";s:3:\"SSL\";s:3:\"get\";a:1:{s:6:\"osCsid\";s:76:\"38406e7742b2f3c92cd9978c4c46ace3?osCAdminID=1xxxxxxxxxxxxxxxxxxxxxxxxxxa\";}s:4:\"post\";a:0:{}}}s:8:\"snapshot\";a:0:{}}')

 

[TEP STOP]

 

1062 - Duplicate entry '38406e7742b2f3c92cd9978c4c46ace3' for key 1

 

insert into sessions values ('38406e7742b2f3c92cd9978c4c46ace3?osCAdminID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', '1117404068', 'SESSION_SSL_ID|b:0;cart|O:12:\"shoppingcart\":4:{s:8:\"contents\";a:0:{}s:5:\"total\";i:0;s:6:\"weight\";i:0;s:12:\"content_type\";b:0;}language|s:7:\"english\";languages_id|s:1:\"1\";currency|s:3:\"USD\";navigation|O:17:\"navigationhistory\":2:{s:4:\"path\";a:1:{i:0;a:4:{s:4:\"page\";s:18:\"create_account.php\";s:4:\"mode\";s:3:\"SSL\";s:3:\"get\";a:1:{s:6:\"osCsid\";s:76:\"38406e7742b2f3c92cd9978c4c46ace3?osCAdminID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\";}s:4:\"post\";a:0:{}}}s:8:\"snapshot\";a:0:{}}')

 

[TEP STOP]

is at the bottom of my create_accounts page.

Does anyone recognize what is causing this and can you give me a hint on how to correct it? Note that I have X'd out the AdminID

Posted

most likely your configure.php isnt setup properly, make sure that store_sessions is set to mysql

next go into phpmyadmin, then choose your database, select the sessions table and empty it

Posted
most likely your configure.php isnt setup properly, make sure that store_sessions is set to mysql

next go into phpmyadmin, then choose your database, select the sessions table and empty it

 

How/where do I check to see if store_sessions is set to mysql. I'm sure it is, but I need to check as you said.

Posted

includes/configure.php

admin/includes/configure.php

 

on the last line of both make sure it says 'mysql' where indicated.

 

Vger

Posted

Thanks.

I've tried all that has been suggested so far, but no luck in correcting this anamoly. :'(

Posted

Ummm - the very fact that it is running a query indicates that session data is already being stored in MySQL...

 

Wait until your store has no (or few) visitors then just truncate the sessions table in phpMyAdmin.

 

or run "DELETE FROM sessions" in the SQL Tab of phpMyAdmin

 

Make sure you have "recreate session" set true in your Admin

Posted

OK, I set "recreate sessions" in my Admin to true.

Clicking on the "Empty" tab from SQL tab of Sessions database gives me a "delete from database" message, but still get the error message.

What do you mean by "truncate the sessions table"?

Posted

I get the error when I click on the "guest login" or "create account" from the index. The error messages occur at the bottom of the new pages. I don't know exactly what causes the messages.

Posted

recreate sessions will not do anything at all, all that does, is when someeone logs in, it recreates their session. you did not follow the instructions, as a few have stated.

open your database in phpmyadmin, select the database for oscommerce, click on the sessions table, then select the 'empty database'.

if you do not know how to do this, prior to doing anything more, go to the internet, search for 'phpmyadmin tutorial'.

make sure you backup your database, if you lose it, well dont way you were not warned.

Posted

Well, let me see. I went to myphpAdmin and logged on.

I then clicked on my store data base name.

Then I clicked on the sesssions database on the left.

Then I clicked on the three items in the table including the sessions key.

Then I clicked on the "empty" tab at the top which was red.

Afterwards the tab was black.

However, the message(s) still appear(s) at the bottom of the above referenced pages.

Posted

did u set store_sessions to mysql

double check the database, make sure it is empty

Posted

Yes, the "sessions" database is empty after I click on "empty" tab.

I checked my "configur.php" files again. Here is what I have for "store_sessions":

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

Posted

Well, something is amiss, since if you are getting the errors on the catalog side, why does the text of your original post include the oscAdminID? This is only used on the Admin side.

Posted

My guess would be that it's something to do with your configured secure paths, but to be honest, troubleshooting with so little to go on is a bit hit and miss.

Posted
troubleshooting with so little to go on is a bit hit and miss.

Well, what do you need or need to know?

Something additional that I just noticed while ago, is that when another section of the catalog is clicked on after the intial click into the catalog, admin no longer or rarely picks up the time of the 2nd click, but picks it up as a new guest entering the store.

Posted

Well, for a start, posting your configure.php files (blank Database info out) would help.

Also, have you installed any contributions or changed code recently? When did you start noticing this?

 

If you were a bit more methodical in the backup/change/testing cycle, it would be trivial to undo changes that mess things up like this...

Posted

configure.php

<?php



/*



 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', 'https://secure1.hostsave.com/ssl/xxxxxx'); // eg, http://localhost - should not be empty for productive servers



 define('HTTP_CATALOG_SERVER', 'http://www.kcesco.com');



 define('HTTPS_CATALOG_SERVER', 'https://secure1.hostsave.com/ssl/xxxxxx');



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



 define('DIR_FS_DOCUMENT_ROOT', '/nfs/cust/9/57/27/472759/web/catalog/'); // where the pages are located on the server



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



 define('DIR_FS_ADMIN', '/nfs/cust/9/57/27/472759/web/catalog/admin/'); // absolute pate required



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



 define('DIR_FS_CATALOG', '/nfs/cust/9/57/27/472759/web/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', 'mysql.kcesco.com'); // eg, localhost - should not be empty for productive servers



 define('DB_SERVER_USERNAME', 'xxxxxx');



 define('DB_SERVER_PASSWORD', 'xxxxxxxx');



 define('DB_DATABASE', 'xxxxxx');



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



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



?>

 

I noticed it Friday or Saturday. As far as I know, only one person has had trouble logging in after registering. There are no other problems that I know of, it just looks bad.

If you were a bit more methodical in the backup/change/testing cycle, it would be trivial to undo changes that mess things up like this...

I would agree with this, but I don't know the specifics of what your are referring to.

Posted

this is wrong:

define('DIR_FS_DOCUMENT_ROOT', '/nfs/cust/9/57/27/472759/web/catalog/');

I use:

define('DIR_FS_DOCUMENT_ROOT', $DOCUMENT_ROOT);

you can use:

define('DIR_FS_DOCUMENT_ROOT', '/nfs/cust/9/57/27/472759/web');

however i am not sure how far down yours goes, thus always best to use $DOCUMNENT_ROOT

Posted

Thanks. I have this in my other configure.php file.

  define('DIR_FS_CATALOG', '/nfs/cust/9/57/27/472759/web/catalog/');

Should I change it, and if so, what should I change it to?

Posted

this: 'DIR_FS_CATALOG' means where is your catalog, you have it pointing to the catalog

Posted

yes, but shouldn't I replace '/nfs/cust/9/57/27/472759/web/catalog/' with $DOCUMNENT_ROOT as you said in your previous post?

Posted
yes, but shouldn't I replace '/nfs/cust/9/57/27/472759/web/catalog/' with $DOCUMNENT_ROOT as you said in your previous post?

that is should it be $CATALOG instead of '/nfs/cust/9/57/27/472759/web/catalog/' ?

Posted

i've faced a same error message as duplicate entry. when a customer tries to log on second time this error message occures. Once all my customers info had been deleted and that's why a new customer can see the history details of the previous customer or receive a message like duplicate entry. Anyhow I could not fix the problem.

Archived

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

×
×
  • Create New...