Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Error when creating account


hansmignon

Recommended Posts

Hello,

 

I have a strange problem and cannot find the solution.

 

When I create a new account and I click on submit he gave me this error:

 

0 -

 

insert into customers_info (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('0', '0', now())

 

[TEP STOP]

 

If I check the customer in admin he is created and I can login but when I want to edit him in admin he gave me this error:

 

Warning: reset(): Passed variable is not an array or object in /var/www/html/adminpanel/includes/classes/object_info.php on line 17

 

Warning: Variable passed to each() is not an array or object in /var/www/html/adminpanel/includes/classes/object_info.php on line 18

 

Has anyone and idee what is causing this ?

 

Thx,

 

Hans

Link to comment
Share on other sites

  • 1 month later...
Hello,

 

I have a strange problem and cannot find the solution.

 

When I create a new account and I click on submit he gave me this error:

 

0 -

 

insert into customers_info (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('0', '0', now())

 

[TEP STOP]

 

If I check the customer in admin he is created and I can login but when I want to edit him in admin he gave me this error:

 

Warning: reset(): Passed variable is not an array or object in /var/www/html/adminpanel/includes/classes/object_info.php on line 17

 

Warning: Variable passed to each() is not an array or object in /var/www/html/adminpanel/includes/classes/object_info.php on line 18

 

Has anyone and idee what is causing this ?

 

Thx,

 

Hans

 

 

I've got a similar problem.

 

I've tracked it down to the line in the create_account.php

 

$customer_id = tep_db_insert_id();

 

just after

 

tep_db_perform(TABLE_CUSTOMERS, $sql_data_array);

 

Not bringing back the correct value for $customer_id

 

The line

 

tep_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created, customers_info_source_id) values ('" . (int)$customer_id . "', '0', now(), '". (int)$source . "')");

 

 

Is therefore trying to insert the record as customer_id 0 and this is where it bombs out.

 

Anbody got an idea why the function tep_db_insert_id() would stop working?

 

Regards,

 

- Earl

Link to comment
Share on other sites

I've got a similar problem.

 

I've tracked it down to the line in the create_account.php

 

$customer_id = tep_db_insert_id();

 

just after

 

tep_db_perform(TABLE_CUSTOMERS, $sql_data_array);

 

Not bringing back the correct value for $customer_id

 

The line

 

tep_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created, customers_info_source_id) values ('" . (int)$customer_id . "', '0', now(), '". (int)$source . "')");

Is therefore trying to insert the record as customer_id 0 and this is where it bombs out.

 

Anbody got an idea why the function  tep_db_insert_id() would stop working?

 

Regards,

 

- Earl

 

 

This also seems different from the problems with duplicate keys people are having when creating an account.

 

Regards,

 

- Earl

Link to comment
Share on other sites

This also seems different from the problems with duplicate keys people are having when creating an account.

 

Regards,

 

- Earl

 

 

Also, this problem is only occuring *sometimes*, so most customers are still able to register, but now and then a customer will have problems creating an account!

 

- Earl

Link to comment
Share on other sites

Hello - I too had this problem and got zero help, but have managed to dig out the fix from an ancient report. Heres a copy of my post to help!

 

Thanks for everybodys help. :(

 

Anyway, in case anybody else comes across this on a search, the fix is incredibly simple. 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 - I take no credit for solving this, but surely some of the more experienced members on here could provide just a little bit more help with this kind of problem. This could very easily have killed my business, as it definitely lost me around 60% of my orders over the 3 days it has taken me to solve.

 

Enough ranting, heres the fix. Open 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);
}

 

Done. Dead quick, really simple, and solves problems nicely. The number of iffy fixes suggested is worrying, but this one does what it says on the tin. I'm now going to go and copy this EXACT message onto the other 5 people who currently seem to be having the exact same issues. Honestly, I cant tell you how mad I am that ths problem, which obviously potentially exists on ANY store is not highlighted or supported.

 

Enough ranting, thanks and I hope this post helps.

Please note - if I have suggested a contrib above, it doesnt mean it will work! Most of the contribs are not ones I've used, but may be useful for your particular problem....

Have you tried a refined search? Chances are your problem has already been dealt with elsewhere on the forums.....

if (stumped == true) {

return(square_one($start_over)

} else {

$random_query = tep_fetch_answer($forum_query)

}

Link to comment
Share on other sites

Hello - I too had this problem and got zero help, but have managed to dig out the fix from an ancient report. Heres a copy of my post to help!

 

 

The best type of fixe of all !

 

It works and it's simple!

 

Thanks,

 

- Earl

Link to comment
Share on other sites

Ah, found the answer, thanks Tony, this is why so many sites configuring their database connection to USE_PCONNECT as true in their includes/configure.php -- Earl could you confirm ?

"Any fool can know. The point is to understand." -- Albert Einstein

Link to comment
Share on other sites

Ah, found the answer, thanks Tony, this is why so many sites configuring their database connection to USE_PCONNECT as true in their includes/configure.php -- Earl could you confirm ?

 

 

Mine's set to true.

 

- Earl

Link to comment
Share on other sites

  • 3 weeks later...
Ah, found the answer, thanks Tony, this is why so many sites configuring their database connection to USE_PCONNECT as true in their includes/configure.php -- Earl could you confirm ?

What is the benefit of using PCONNECT?

Link to comment
Share on other sites

  • 2 years later...

I had the same problem after copying a shop, where i deleted the user-accounts (adress_book, customers, customers_info) after this i hat the same problem. solved with the new tep_db_insert_id- function.

 

i dont know why this happenend. In my Create account- procedure is a phpbb-bridge (using another database) implemented.

 

Stefan

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...