trex Posted February 20, 2004 Posted February 20, 2004 Hello, when i create a new account i get this error. what is the meaning of this error? Warning: reset() [function.reset]: Passed variable is not an array or object in /home/www/web564/html/includes/classes/email.php on line 71 Warning: Variable passed to each() is not an array or object in /home/www/web564/html/includes/classes/email.php on line 72 Fatal error: Call to a member function on a non-object in /home/www/web564/html/includes/functions/general.php on line 970 Query was empty - Query was empty Query was empty [TEP STOP] Warning: Unknown(): A session is active. You cannot change the session module's ini settings at this time. in Unknown on line 0 Thanks
Yari Posted February 23, 2004 Posted February 23, 2004 I have the same problem with a shop I have installed. Does anyone know what the problem is ?
Yari Posted February 23, 2004 Posted February 23, 2004 I will answer my self :D There is a lot of people having the sam problem, when I did a search http://www.oscommerce.com/forums/index.php?act...array+or+object I Was helped when I read this http://www.oscommerce.com/forums/index.php?showtopic=77655&st=10 and when I changed everything in the admin under Customer details to true. It must be a bug in osCommerce.
azimuth Posted March 5, 2004 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 ! :) :)
azimuth Posted March 8, 2004 Posted March 8, 2004 Bug in PHP 4.3.1. Corrected in PHP 4.3.2 Upgrade PHP and there is no problem anymore.
HQ Secure Posted March 30, 2004 Posted March 30, 2004 See this post: http://www.oscommerce.com/forums/index.php?showtopic=28334&st=0
Recommended Posts
Archived
This topic is now archived and is closed to further replies.