Skip to content

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

by Mr Mackintosh on June 14th, 2007

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

From → E-commerce

3 Comments
  1. 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. Mr Mackintosh permalink

    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. James permalink

    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

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS