Lucas.at Posted March 4, 2004 Share Posted March 4, 2004 Hi! If a customer wants to register at my store, the following error code appears: Warning: reset() [function.reset]: Passed variable is not an array or object in /var/www/user/shop/catalog/includes/classes/email.php on line 71 Warning: Variable passed to each() is not an array or object in /var/www/user/shop/catalog/includes/classes/email.php on line 72 Fatal error: Call to a member function on a non-object in /var/www/user/shop/catalog/includes/functions/general.php on line 970 I can find him if i look up at customers in admin area. Can u help me out there please. I use OSC 2.2 MS2 shop can be found at: here thx lucas Link to comment Share on other sites More sharing options...
Lucas.at Posted March 5, 2004 Author Share Posted March 5, 2004 Really noone knows whats the matter here? Link to comment Share on other sites More sharing options...
azimuth Posted March 5, 2004 Share Posted March 5, 2004 Hi. I got the same problem on Unix platform but not on a Windows one. I think this is really a (strange!) bug in oscommerce ms2.2 I found a workaround : This only works if you don't care about "state" customer address information. The idea is in eliminating the "state" customer address information anywhere in oscommerce. In the file create_account.php, find : if (ACCOUNT_STATE == 'true') { $zone_id = 0; $check_query = tep_db_query("select count(*) as total from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "'"); $check = tep_db_fetch_array($check_query); $entry_state_has_zones = ($check['total'] > 0); if ($entry_state_has_zones == true) { $zone_query = tep_db_query("select distinct zone_id from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' and (zone_name like '" . tep_db_input($state) . "%' or zone_code like '%" . tep_db_input($state) . "%')"); if (tep_db_num_rows($zone_query) == 1) { $zone = tep_db_fetch_array($zone_query); $zone_id = $zone['zone_id']; } else { $error = true; $messageStack->add('create_account', ENTRY_STATE_ERROR_SELECT); } } else { if (strlen($state) < ENTRY_STATE_MIN_LENGTH) { $error = true; $messageStack->add('create_account', ENTRY_STATE_ERROR); } } } and replace with : if (ACCOUNT_STATE == 'true') { $zone_id = 0; $check_query = tep_db_query("select count(*) as total from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "'"); $check = tep_db_fetch_array($check_query); $entry_state_has_zones = ($check['total'] > 0); /* if ($entry_state_has_zones == true) { $zone_query = tep_db_query("select distinct zone_id from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' and (zone_name like '" . tep_db_input($state) . "%' or zone_code like '%" . tep_db_input($state) . "%')"); if (tep_db_num_rows($zone_query) == 1) { $zone = tep_db_fetch_array($zone_query); $zone_id = $zone['zone_id']; } else { $error = true; $messageStack->add('create_account', ENTRY_STATE_ERROR_SELECT); } } else { if (strlen($state) < ENTRY_STATE_MIN_LENGTH) { $error = true; $messageStack->add('create_account', ENTRY_STATE_ERROR); } }*/ } In fact you have to comment a portion of code. You have also to modifiy 8 other files to completely eliminate "state" address information. In each of theses files : address_book_process.php checkout_payment_address.php checkout_shipping_address.php admin/customers.php includes/form_check.js.php includes/modules/address_book_details.php includes/modules/checkout_new_address.php Enclose each if (ACCOUNT_STATE == 'true") {..... .... ... } with /* */ (or simply delete the blocks). About half an hour work... and it works ! :) :) Link to comment Share on other sites More sharing options...
Lucas.at Posted March 6, 2004 Author Share Posted March 6, 2004 I edited all the files, sure that correct, but this error still apears. There must be even an error in the whole mail-procedure. cus i can send mails (rg. from admin-panel) but they never arrive. Same with the reg-mail. and customer deatils is set to false. should not matter then, or? any other ideas? Link to comment Share on other sites More sharing options...
Lucas.at Posted March 6, 2004 Author Share Posted March 6, 2004 oh yes and when i turn off email-sending: Error! Unable to determine the page link! Link to comment Share on other sites More sharing options...
azimuth Posted March 8, 2004 Share Posted March 8, 2004 You have to let 'state details' to true. In fact it is a bug in PHP 4.3.1 OsCommerce is not responsible. Corrected in PHP 4.3.2+ The best workaround is : upgrade PHP if you can. Link to comment Share on other sites More sharing options...
Lucas.at Posted March 8, 2004 Author Share Posted March 8, 2004 I hope this helps, will try to update tonight. results follow. thx for now :) greets lucas Link to comment Share on other sites More sharing options...
woodyV Posted March 9, 2004 Share Posted March 9, 2004 Hi Lucas, I had the same error when a customer tried to register. This information solved it for me, it is in dutch but i think you wil get the point; http://www.oscommerce.nl/forums/index.php?showtopic=1169 Link to comment Share on other sites More sharing options...
Lucas.at Posted March 9, 2004 Author Share Posted March 9, 2004 :rolleyes: Yep, thx this was exact the problem. thx thx thx :D greets lucas Link to comment Share on other sites More sharing options...
isojourn Posted March 9, 2004 Share Posted March 9, 2004 azimuth: If it is a bug in PHP(version release), then is it a bug in php in handling the commands or in how it deals with syntax or in how it handles an error in the code itself? Is there perhaps a cleaner way to write this section to avoid stressing PHP or is that version of PHP breaking other code in other projects as well? Link to comment Share on other sites More sharing options...
azimuth Posted March 24, 2004 Share Posted March 24, 2004 isojourn : I really don't know... I have just worked on correct this problem in my shop... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.