'cannot yet handle MBCS in html_entity_decode' error on WP-DownloadManager

I am currently working on a WordPress-powered site. One of its features is a download section. After comparing some WordPress plugins, I decided to use Lester ‘GaMerZ’ Chan‘s WP-DownloadManager.
When I use that plugin on WordPress 2.5.1, I got an error. It’s something like this:

Warning: cannot yet handle MBCS in html_entity_decode()! in /home/.../wp-downloadmanager.php on line 308

Is it a bug? It seems that I got this error message because this plugin needs PHP 5 (I still use PHP 4). Since many hosts having PHP 5-enabled (even it does not always installed as the default version), it should not be that difficult to solve this issue. All I need to do is making all .php files are treated as PHP 5 files. Okey, this is a straight forward solution: add a new line in your .htaccess file. You should find it in your WordPress directory, if not, just add this line:

AddType application/x-httpd-php5 .php

And, the problem solved.
Update: Put AddType application/x-httpd-php5 .php in the first line in .htaccess file. Here is mine:

AddHandler application/x-httpd-php5 .php
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

After that, create a new php file e.g. myphpinfo.php and include this line:

<?php phpinfo(); ?>

This will display about PHP version (affected by .htaccess).

Join the Conversation

10 Comments

  1. I’m also using php 5. And having the same problem ???
    how to solve this kind of problems ?

  2. I have no problem at all when using the solution I write here. Currently, it works great on WordPress 2.5.1 and PHP 5.2.2. Just make sure you have the newest version of WP-DownloadManager.

  3. I would like to ask;
    Where I need to put this line in .htaccess file ?
    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    # END WordPress
    I have something like that for .htaccess in wordpress folder.

  4. THANK YOU!! I am iframing a script in my wordpress blog that was having this issue. I added the line to that folders’ htaccess and PRESTO, it worked seamlessly.
    I can’t thank you enough!
    Ricci

  5. You. saved. my. life. :D
    Thanks a lot. Though I changed the database to v5 the error continued! But with your bugfix everything is fine.

Leave a comment

Your email address will not be published. Required fields are marked *