Lester Chan's Forums

Please login or register.

Login with username, password and session length
Pages: 1 [2]   Go Down

Author Topic: Widget's "MBCS" warnings? Give this workaround a try!  (Read 20476 times)

0 Members and 1 Guest are viewing this topic.

GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Online Online
  • Posts: 10,040
    • View Profile
    • WWW
Re: Widget's "MBCS" warnings? Give this workaround a try!
« Reply #20 on: 19 June 2008, 17:36 »
instead of error_reporting(0); you might want to try
Code: [Select]
ini_set('error_reporting', 0); also.

But the best way is to upgrade to PHP5. No idea whether you read my blog post http://lesterchan.net/wordpress/2008/06/09/warning-cannot-yet-handle-mbcs-in-html_entity_decode/
Logged

++ lesterchan.net - Lester Chan's Website

I DO NOT provide support for any modifications of any plugin to meet your needs/requirements, unless it is a paid job and I have the time to do it due to the large number of request.

eddyra

  • Newbie
  • *
  • Offline Offline
  • Posts: 2
    • View Profile
Re: Widget's "MBCS" warnings? Give this workaround a try!
« Reply #21 on: 25 June 2008, 16:33 »
I like this plugin, but the latest version 1.3 does not work with my wordpress 2.5.1. I tried put error reporting (0); solution in the config.php file, htaccess at various times and neither solution worked.

Downgrade to old version:

1- Deactivate the latest plugin.
2- Download previous version 1.11, open wp-postviews folder and transfer postviews folder (NOT WP-POSTVIEW folder) to wp-content/plugins.
3- Activate the 1.11 plugin..

You still can use this plugin until your host upgrade to PHP5.2 or something. Its work for me.

www.eddyra.net
Logged

eddyra

  • Newbie
  • *
  • Offline Offline
  • Posts: 2
    • View Profile
Re: Widget's "MBCS" warnings? Give this workaround a try!
« Reply #22 on: 25 June 2008, 16:33 »
Never delete your plugin or you will lose all the 'views' data.
Logged

GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Online Online
  • Posts: 10,040
    • View Profile
    • WWW
Re: Widget's "MBCS" warnings? Give this workaround a try!
« Reply #23 on: 25 June 2008, 18:53 »
nope will not lose unless you uninstall it.
Logged

++ lesterchan.net - Lester Chan's Website

I DO NOT provide support for any modifications of any plugin to meet your needs/requirements, unless it is a paid job and I have the time to do it due to the large number of request.

djdeep

  • Newbie
  • *
  • Offline Offline
  • Posts: 9
    • View Profile
Re: Widget's "MBCS" warnings? Give this workaround a try!
« Reply #24 on: 05 July 2008, 16:05 »
Adding

Code: [Select]
AddHandler application/x-httpd-php5 .php
in your .htaccess file only works if on the server there is PHP 5.x installed. Many servers have both PHP 4 and PHP 5 installed and this is a way to switch between them. For the other hosting servers that won't do any good.

Try this:

Code: [Select]
Guilherme Silva, PMP Says:

June 24th, 2008 (2 weeks ago) at 09:59
A workaround for this error is using utf8_decode($text) instead of using the default html_entity_decode() used in the plugins.

This would work fine only if your blog is utf8 encoded, but the error only hapens (as i could see from the php bug page) when you try to decode utf8 text, and it is default to Wordpress anyway.

eg: for the post rating plugin, replace the line 573 from wp-postratings.php from:

$text=html_entity_decode($text,ENT_QUOTES,get_option(’blog_charset’));

to:

$text = utf8_decode($text);

Of course, you should check if the blog really is utf8 before doing so.

Best Regards,
Guilherme Silva, PMP
http://www.gerenciamentoeconomico.com.br
Logged

Ttech

  • Official Support
  • Global Moderator
  • *****
  • Offline Offline
  • Posts: 4,294
    • View Profile
    • WWW
Re: Widget's "MBCS" warnings? Give this workaround a try!
« Reply #25 on: 07 July 2008, 06:09 »
Um...  Thats not right.... Adding php5 will make it use php5 even if there is php4 installed
Logged
Learning and Helping one day at a time.




DevNode.org Operator - The IRC network for Programers

Richard Palace

  • Newbie
  • *
  • Offline Offline
  • Posts: 1
    • View Profile
    • WWW
Re: Widget's "MBCS" warnings? Give this workaround a try!
« Reply #26 on: 18 July 2008, 18:02 »
I am still at php4, so the solution I am using is the following and is working.

1. Open wp-postratings.php
2. Find
Quote
$text = html_entity_decode($text, ENT_QUOTES, get_option('blog_charset'));
3. Replace with
Quote
if(( version_compare( phpversion(), '5.0' ) < 0 ) && (strtolower(get_option('blog_charset')) == 'utf-8')) {
   $trans_tbl = get_html_translation_table (HTML_ENTITIES);
   $trans_tbl = array_flip ($trans_tbl);
   $text = strtr ($source, $trans_tbl);
   $text = utf8_encode($text);
}else{
   // url decode (phpversion =< 5.0 or get_option('blog_charset')!= utf-8 )
   $text = @html_entity_decode($text, ENT_QUOTES, get_option('blog_charset'));
}
Logged

GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Online Online
  • Posts: 10,040
    • View Profile
    • WWW
Re: Widget's "MBCS" warnings? Give this workaround a try!
« Reply #27 on: 18 July 2008, 23:33 »
Thanks for sharing =)
Logged

++ lesterchan.net - Lester Chan's Website

I DO NOT provide support for any modifications of any plugin to meet your needs/requirements, unless it is a paid job and I have the time to do it due to the large number of request.

lndasa

  • Newbie
  • *
  • Offline Offline
  • Posts: 1
    • View Profile
Re: Widget's "MBCS" warnings? Give this workaround a try!
« Reply #28 on: 05 August 2008, 00:58 »
The workaround error_reporting(0); in wp-config.php doesn't seem to work please let me know if there is any other.
Logged

GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Online Online
  • Posts: 10,040
    • View Profile
    • WWW
Logged

++ lesterchan.net - Lester Chan's Website

I DO NOT provide support for any modifications of any plugin to meet your needs/requirements, unless it is a paid job and I have the time to do it due to the large number of request.

relejosh

  • Newbie
  • *
  • Offline Offline
  • Posts: 2
    • View Profile
Re: Widget's "MBCS" warnings? Give this workaround a try!
« Reply #30 on: 26 August 2008, 04:04 »
I tried the fix of using error_reporting(0) but as others have posted I didn't have a home.php as directed.  I came to another solution before seeing other suggestions about where else to put that error_reporting(0) line.  And while it may be cleaner to use the error_reporting function, I am surprised no one has mentioned this .... Simply put @ in front of the line of code that is printing all of the php warnings.  Generally you want to find and solve the source of error reporting.  But when its just warnings or other messages that you know you can disregard, then its safe to use this technique.

So, specifically in wp-content/plugins/wp-email/wp-email.php on line 338 I have this line of code:
                $text = @html_entity_decode($text, ENT_QUOTES, get_option('blog_charset'));

Notice the @ in front of html_entity_decode.  See this php note for more information, but this php shortcut basically suppresses all error reporting for that specific function.  And error_reporting is a php function as well (I didn't know that until just now actually).  So either solution should hopefully work.  Using @ in front of the offending function worked for me.

Josh
Logged

relejosh

  • Newbie
  • *
  • Offline Offline
  • Posts: 2
    • View Profile
Re: Widget's "MBCS" warnings? Give this workaround a try!
« Reply #31 on: 26 August 2008, 04:08 »
Sry, I didn't post the php note that I intended to.  Here's the php documentation I found on error_reporting (http://us.php.net/error_reporting).  Here's a doc explaining how to use @ to hide errors (http://us.php.net/operators.errorcontrol)

Josh
Logged

GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Online Online
  • Posts: 10,040
    • View Profile
    • WWW
Re: Widget's "MBCS" warnings? Give this workaround a try!
« Reply #32 on: 26 August 2008, 05:13 »
Hi Josh, that is a good work around, damn didn't thought of that. Thanks alot
Logged

++ lesterchan.net - Lester Chan's Website

I DO NOT provide support for any modifications of any plugin to meet your needs/requirements, unless it is a paid job and I have the time to do it due to the large number of request.
Pages: 1 [2]   Go Up
« previous next »
 

Page created in 0.038 seconds with 24 queries.