mb_language() problem - php.ini settings?

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

Threaded View
In a script I'm using successfully on a Linux server the code:


gives the error message:

Fatal error: Call to undefined function mb_language() in
W:\sites\play-school\httpdocs\contactar.php on line 2

on my PHP installation on my windows system.

I have php_mbstring.dll in E:\PHP\ext but think I haven't got it set up
correctly in php.ini:

In the Windows extensions section I have
extension=php_mbstring.dll and the extension directory is set to
extension_dir =E:\PHP\ext

I also have the following, most of which are commented out:

; language for internal character representation.
mbstring.language = Neutral; Set default language to Neutral(UTF-8)

; internal/script encoding.
; Some encoding cannot work as internal encoding.
; (e.g. SJIS, BIG5, ISO-2022-*)
mbstring.internal_encoding    = UTF-8  ; Set internal encoding to UTF-8

; http input encoding.
;mbstring.http_input = auto

; http output encoding. mb_output_handler must be
; registered as output buffer to function
;mbstring.http_output = SJIS

; enable automatic encoding translation according to
; mbstring.internal_encoding setting. Input chars are
; converted to internal encoding by setting this to On.
; Note: Do _not_ use automatic encoding translation for
;       portable libs/applications.
;mbstring.encoding_translation = Off

; automatic encoding detection order.
; auto means
;mbstring.detect_order = auto

; substitute_character used when character cannot be converted
; one from another
;mbstring.substitute_character = none;

Any advice appreciated.

XP Pro / Apache 1.3.29 / PHP 5.2.0


Re: mb_language() problem - php.ini settings?

Nick Iredale wrote:
Quoted text here. Click to load it

Run <? phpinfo(); ?> and make sure 'mbstring' is listed there. Also,  
does 'path to php.ini' actually point to the file you're editing? If  
both is yes, restart apache (exe file, not the service) and look if you  
get any error messages.

gosha bine

extended php parser ~ http://code.google.com/p/pihipi
blok ~ http://www.tagarga.com/blok

Re: mb_language() problem - php.ini settings?


Quoted text here. Click to load it
Thanks Gosha,

The php.ini I am editing is in the same directory as the php executable
phpinfo.php isn't mbstring and I'm getting the error message in the log:

Unknown PHP Warning:  PHP Startup: Unable to load dynamic library  
'E:\PHP\ext\php_mbstring.dll' - The specified module could not be found.

The actual path to the file is: E:\PHP\ext\php_mbstring.dll and matches  
the path specified in php.ini.

I downloaded the PECL 5.2.4 Win32 binaries archive and extracted the  
files to E:\PHP\ext but it doesn't contain php_mbstring.dll, so I copied  
it from elsewhere (down loaded in 2003).  php finds other dll files in  
the same directory, so perhaps it is incompatible or corrupted.  If so  
where would I download a valid file?  (php.net seems to say that all the  
extensions are in the PECL download!)

(BTW I'm having the same problem with php_gd2.dll)

Re: mb_language() problem - php.ini settings?

Nick Iredale wrote:
Quoted text here. Click to load it

Did you download the .zip file or the .msi file?  If the latter, it  
doesn't include all extensions.  Download the .zip file and install it  

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

Site Timeline