OsCommerce Error: insert into customers_info (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values (’0′, ‘0′, now())

Bookmark and Share

Stumbled accross this nasty little error on a client’s installation of OsCommerce. The problem occurs when a new user is signing up, so this can be a real show stopper and cost sales!

Anyway thankfully I quickly found the solution and the fix is pretty quick and simple

catalog/includes/functions/database.php. Find the line relating to tep_db_insert_id and change it to:

function tep_db_insert_id( $link = 'db_link') {
global $$link;
return mysql_insert_id($$link);
}

By the looks of the solution, perhaps problem occurs because of a non persistant database connection, or other subsequent queries having run.

http://forums.oscommerce.com/index.php?showtopic=155215

3 Responses to “OsCommerce Error: insert into customers_info (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values (’0′, ‘0′, now())”


  1. 1 Jen Jun 15th, 2007 at 4:42 am

    You are talking about a problem that is over 2 years old and relates to database configurations more than osCommerce. And you found the solution on that post.

    So why the blog post about it. It’s old news.

  2. 2 Mr Mackintosh Jun 15th, 2007 at 5:05 am

    Wow I didn’t realise it was 2 years old! Anyway it was a serious show stopper last to a clients store last week, so I think it’s helpful to publish the solution here, even if it’s published elsewhere aswell - the more publisised the solution the easier it will be to find especially for newbies who will invariably turn to google as their first port of call.

    I think this comment from the forum above was what really encouraged me to post!

    By the way, on my searches for a solution I found over 100 unanswered posts regarding this EXACT issue, and the solution was buried in an ancient bug report

  3. 3 James Nov 30th, 2007 at 3:43 am

    I get that nasty error and I inserted this fix…it worked at first, but now I get the error again so I double checked the database.php file and the fix is still there…

    any thoughts?

Leave a Reply




Timezone

  • JST: 2008-10-08 14:16
  • BST: 2008-10-08 06:16
  • PDT: 2008-10-07 22:16