Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

JsHttpRequest.php creating error

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-27-2010, 04:47 PM
 
hyper1 hyper1 is offline
 

Advanced Member
  
Join Date: Jun 2008
Posts: 52
 

Default JsHttpRequest.php creating error

I have a mod created by Qualiteam that uses the file JsHttpRequest.php. I googled the file and found it is an open source, cross-browser AJAX library with AJAX file uploading support. I have noticed I get constant errors logged with the following log entry

Warning: mb_convert_encoding() [<a href='function.mb-convert-encoding'>function.mb-convert-encoding</a>]: Illegal character encoding specified in http://mysite/include/JsHttpRequest.php on line 458

I never noticed the errors until I started paying attention to the error logs. The error does not appear to affect the functionality of the drop down selectors that utilize this file, but it certainly fills an error log in a hurry.

I went to the library's home site (http://en.dklab.ru/lib/JsHttpRequest/) where I downloaded the latest library, replaced the file, and still get the same error.

I would like to get the error fixed, and am not opposed to going to Qualiteam for help, but would like to take the path of least resistance. I would be willing to pay someone for help, or would gladly take any pointers from anyone who may be familiar with the situation.

Thanks
__________________
Tim
x-cart pro 4.1.11, x-AOM, CDSEO, css layout - no tables (almost), free social bookmarking mod (xcartmod.co.uk - thanks), altered cart On Sale, One Page Checkout and Smart Search (all amazing products), Custom Code from CFL (the best), Hands-On Hosting for live site
Reply With Quote
  #2  
Old 03-28-2010, 06:49 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: JsHttpRequest.php creating error

Hey Tim, I looked one more time on this issue for you and it seems you are not the only one experiencing something like this.

"mb-convert-encoding" is a PHP function - http://www.php.net/manual/en/function.mb-convert-encoding.php

Also this one talks about it - http://gallery.menalto.com/node/30054

I think the function in your case would be this one from JsHttpRequest.php
Code:
function _unicodeConv($fromEnc, $toEnc, $v) { if ($this->_unicodeConvMethod == 'iconv') { return iconv($fromEnc, $toEnc, $v); } return mb_convert_encoding($v, $toEnc, $fromEnc); }

And maybe if you replace it with this will make the error disappear (or I can do it for you)

Code:
function _unicodeConv($fromEnc, $toEnc, $v) { if ($this->_unicodeConvMethod == 'iconv') { return iconv($fromEnc, $toEnc, $v); } if ($fromEnc == NULL) { return mb_convert_encoding($v, $toEnc); } else { return mb_convert_encoding($v, $toEnc, $fromEnc); } }

(posted here just in case anyone else is experiencing same problem)
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #3  
Old 03-28-2010, 09:50 AM
 
hyper1 hyper1 is offline
 

Advanced Member
  
Join Date: Jun 2008
Posts: 52
 

Default Re: JsHttpRequest.php creating error

Steve,

You are brilliant. I read the posts on several sites last night and just never figured out what I needed to update, finally updated to the most recent file release, all with no luck. Your recommendation seems to have worked - I have not been able to replicate the error since updating the file.

I will keep trying (and hoping I cannot get the error) but for now it looks like you did it. Add this one to the long list of favors you've done for me and my future bill.

I can't help but add, if anyone who reads this has not had the pleasure of working with Steve at CFL then you are missing out. This is one more example of how Steve goes out of his way to help, and makes my life of running a store much easier. The best developer I could have ever hoped to find.

Thanks so much.
__________________
Tim
x-cart pro 4.1.11, x-AOM, CDSEO, css layout - no tables (almost), free social bookmarking mod (xcartmod.co.uk - thanks), altered cart On Sale, One Page Checkout and Smart Search (all amazing products), Custom Code from CFL (the best), Hands-On Hosting for live site
Reply With Quote
  #4  
Old 03-28-2010, 11:55 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: JsHttpRequest.php creating error

Thanks Tim. Glad to be of help
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:32 AM.

   

 
X-Cart forums © 2001-2020