"Call to undefined function mb_substr()" in Eclipse PDT

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View


I am learning PHP5. I wrote the following line of code:
    $visibility = mb_substr($visibility, 0, mb_strlen($visibility) -
2) . '], ';
Unfortunately the program terminates with error:
    Call to undefined function mb_substr()
I noticed, that the problem with mb_substr() occurs only in Eclipse
PDT. If I open my page in a browser (http://
localhost/~robert/index.php), mb_substr() works fine.
Here you have what Eclipse PDT displays about mb_substr() termination:
    <terminated, exit value: 0>/opt/eclipse/plugins/
    Debug Error: /home/robert/public_html/nieruchomości-ogłoszenia/
include/functions.inc.php line 619 - Call to undefined function mb_substr
I use:
    Eclipse Platform
    Version: 3.4.1
    Build id: M20080911-1700

I is not my first problem with PHP function call in Eclipse PDT. Method
$mysqli->fetch_assoc() also terminates program in Eclipse PDT but without
any error.

Additionally I enclose result of phpinfo():

Multibyte Support     enabled
Multibyte string engine     libmbfl
Multibyte (japanese) regex support     enabled
Multibyte regex (oniguruma) version     4.4.4
Multibyte regex (oniguruma) backtrack check     On
Directive    Local Value    Master Value
mbstring.detect_order    no value    no value
mbstring.encoding_translation    Off    Off
mbstring.func_overload    0    0
mbstring.http_input    pass    pass
mbstring.http_output    pass    pass
mbstring.internal_encoding    ISO-8859-1    no value
mbstring.language    neutral    neutral
mbstring.strict_detection    Off    Off
mbstring.substitute_character    no value    no value

I didn't compile PHP5. I installed it with my Linux (phpinfo shows: PHP
Version 5.2.6-2ubuntu4.1). I don't remember how I got mbstring extension
- maybe I installed some package? Do I need to perform some configuration
to have mbstring working fine?

Please help. I thought that I have mbstring working but... surprise. I
have little experience with PHP.

Re: "Call to undefined function mb_substr()" in Eclipse PDT

Jivanmukta wrote:
Quoted text here. Click to load it

Is this phpinfo() from your web server, or from Eclipse?  You may be
using two entirely different php.ini files (or none at all in Eclipse).

That's what it sounds like, anyway.

But you should be asking these questions in an Eclipse support group -
they know their product better than anyone.

Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.

Site Timeline