Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

After moving shop


cheeroke

Recommended Posts

Posted

Hi all,

after moving shop from one web host to another I noticed that in customer order information delivery address and billing information is not displayed correctly.

 

Instead of delivery address and billing informations i receive this error followed by address and billing information

Delivery Address

Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/*****/public_html/shop/includes/functions/general.php on line 46

Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/*****/public_html/shop/includes/functions/general.php on line 46

***than proper address***

 

and this one for billing address

Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/*****/public_html/shop/includes/functions/general.php on line 46

Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/*****/public_html/shop/includes/functions/general.php on line 46
***than proper billing information***

 

looks like error is in line 46 of mentioned file but I do not know where to check or make any changes to solve it.

 

which file i have to check, any idea?

 

Any help will be appreciated.

Posted

what is the code around on line 46?

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Posted

I didn't made any changes so code around this line is genuine

44  function tep_output_string($string, $translate = false, $protected = false) {
45   if ($protected == true) {
46	 return htmlspecialchars($string);
47	} else {
48	 if ($translate == false) {
49		return tep_parse_input_field_data($string, array('"' => '"'));
50	  } else {
51		return tep_parse_input_field_data($string, $translate);
52	  }
53	}
54  }

Posted

need the code from the page calling the function too.

 

also, have u tried a dbase repair?

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Posted
need the code from the page calling the function too.

calling the function..... my knowledge is very limited, can you explain what you mean by telling "page calling the function" which function you mean or where should I look for it?

also, have u tried a dbase repair?

hmm, I am not sure is sth wrong with database because on old server same database working correctly.

Posted

Which version of osC are you using - there was a bugfix several versions ago to fix this problem

------------------------------------------------------------------------------

Use The Correct Country Name Value When Formatting Addresses

http://www.oscommerce.com/community/bugs,1291

http://svn.oscommerce.com/trac/changeset/713

------------------------------------------------------------------------------

 

Problem:

 

Depending on the values passed to tep_address_format(), an array value could be used as the country name instead of a string value.

 

Solution:

 

The following line must be replaced in catalog/includes/functions/general.php:

 

Line 453, from:

 

$country = tep_output_string_protected($address['country']);

 

to:

 

$country = tep_output_string_protected($address['country']['title']);

 

The following line must be removed:

 

Line 483:

 

if ($country == '') $country = tep_output_string_protected($address['country']);

(taken from the upgrade guide in the current download)

Posted

My osc 2.2rc1,

but, how to explain fact that on one server it is working correctly but not on second one, where I moved database and all content it? On both servers I got same version of osc.

IMO in those circumstances it should work as well as on old one. Apart from updating paths I should not change anythink else. Am I wrong?

Posted

I've not come accross the bug mentioned, but listen to yourself cheeroke your saying I cant have a problem as the old works so tell me what my problem is!!

 

 

is new server identical to old?

 

could dbase have got corrupted in move,

 

if your not going to try any suggestions then what else do u want!!! :rolleyes:

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Posted

well....

 

perfectpassion was right.

I do not understand why on one server it is ok and on second is not. Well, anyway, thanks for help, now is ok.

 

Many thanks

cheeroke.

Archived

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

×
×
  • Create New...