We help IT Professionals succeed at work.

mb_detect_encoding() - is this native to php 4 or 5

DancingFighterG
on
Medium Priority
579 Views
Last Modified: 2012-05-06
Hello, I'm trying to use this function but on the server that I am using it on it's giving me this error:

Fatal error: Call to undefined function mb_detect_encoding() in D:\Domains\nvgaonline.com\wwwroot\SuperCon2\class.myrssparser.php on line 184

What is the requirements for using this function. I thought that this function was inherited in php 4 or php 5. Is there any other setting on the server I need to know because on my other server it works just fine
Comment
Watch Question

Most Valuable Expert 2011
Author of the Year 2014

Commented:
http://us.php.net/manual/en/mbstring.installation.php

The extension is probably not installed on PHP

Author

Commented:
I think that they installed an activiated the extension but I'm still getting the same error:

www.nvgaonline.com/SuperCon2/test.php
Most Valuable Expert 2011
Author of the Year 2014
Commented:
See the code snippet.  I don't think you have the "short tags" thing set.  So instead of saying <? you will need to say <?php
<?xml version="1.0" encoding="iso-8859-1"?> 
 
 
<body bgcolor="#FFFFFF">
 
      <? 
  		    # where is the feed located?
                $url = "http://nvgaonline.com/Forums/index.php?act=rssout&id=11";
                # create object to hold data and display output
                $rss_parser = new myRSSParser($url);
                $rawoutput = $rss_parser->getRawOutput();
				# returns string containing HTML
                $items = $rawoutput['RSS']['CHANNEL'][0]['ITEM'];
                ?>
                <ul>
                  <?
	         for($i=0; $i<8; $i++) {
               ?>
                  <li> 
                    <div align="left"><a href="<?=$items[$i]['LINK']?>" title="<?=strip_tags($items[$i]['TITLE'])?>" target="_blank"> 
                      <?=strip_tags($items[$i]['TITLE'])?>
                      </a></div>
                  </li>
                  <div align="left"> 
                    <?
               }
               ?>
 
                  </div>
                </ul>
 
</body>

Open in new window

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
I will try this out tonight but I think you are right and it might work
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.