Orangescale.NET

I'm a blogger and web designer from Jogjakarta, Indonesia. See my other blog in Bahasa Indonesia. I love photography. More about me »

More about me: Flickr, Twitter, Facebook, LinkedIn

‘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).

Tags: , , , , ,

in Webdev, Wordpress

11 comments for this entry

  1. ismail Jun 06 '08 at 3:12 am

    I’m also using php 5. And having the same problem ???

    how to solve this kind of problems ?

  2. Thomas Arie Jun 06 '08 at 3:20 am

    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. ismail Jun 06 '08 at 3:39 am

    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. Cat Aug 03 '08 at 5:19 am

    THANK YOU!
    (You rock.)

  5. Ricci Aug 11 '08 at 11:46 am

    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

  6. Ernie Aug 23 '08 at 2:31 am

    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.

  7. Romain Sep 09 '08 at 5:22 am

    Hi

    I have a problem, I uploaded the file .htaccess, but now I can’t access to my website. When I go to http://www.romainblanchais.com the webbrower ask me if I want to open a file ” ” with the type application/x-httpd-php

    Thank you !!!

  8. lixdo Sep 10 '08 at 11:38 am

    tq this solve my problem

  9. Freeware Collection Sep 20 '08 at 5:44 pm

    I had the same problem with another plugin of Lester Chans, the Post Ratings. I followed your instruction and solved it. Thank you so much for a wonderful tip.

  10. Miftah Dec 05 '08 at 2:41 pm

    mas… maturnuwun yaaa…. it worked for me….