I need what for UTF-8 multibyte characters support in PHP?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

I need what for UTF-8 multibyte characters support in PHP?

Post by JAB Creations »

I need to request my server admin to add a PHP library item to get SEHL to work on my site. I just spent about an hour or so working with script's creator to figure out the exact problem. I'll try to get as many necessary details as I can to help you folks help me know what I need to exactly ask my server's admin to add to PHP's library. I'm also giving this link to the original author so he can add it to the FAQ or whatever he has. The script works perfectly fine locally so it helped us greatly knowing it was a server specific issue. Any way the info...

Brian Sudu's Search Engine Highlighting
http://suda.co.uk/projects/SEHL/

How we triggered the error...
When you run the script open the file: results.php. You'll need to comment out ob_start and ob_end_flush();.

Secondly you'll want to directly add the following line (in the first instance of PHP after the body element...

Code: Select all

include ("sehl-1.8.3.php");
sehl('some text here winter all');
You then need to open example.php which emulates a search engine and will send an search engine like referrer to trigger the PHP script.

If the library is missing you get the following error message (minus my server's absolute path)...
Fatal error: Call to undefined function mb_strlen() in sehl/sehl-1.8.3.php on line 238
Line 238 looks like this for anyone who is so smart they don't have to download the script.

Code: Select all

if (mb_strlen($hl,'iso-8859-1') > mb_strlen($hl,'utf-8')){
Brian said my server does not support UTF-8 multibyte characters.

So what exactly should I ask my server's admin that he will not have to ask me any questions to resolve the issue? Thanks in advance!
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Re: I need what for UTF-8 multibyte characters support in PHP?

Post by s.dot »

perhaps the mbstring extension
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Re: I need what for UTF-8 multibyte characters support in PHP?

Post by JAB Creations »

I'm in SSH, presuming I'm completely ignorant of what I need to do in SSH how do I install mbstring?
Post Reply