|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29407 Fatal error: Call to undefined function: bind_textdomain_codeset()
Submitted: 2004-07-27 15:47 UTC Modified: 2004-07-27 23:34 UTC
Avg. Score:4.8 ± 0.4
Reproduced:4 of 4 (100.0%)
Same Version:4 (100.0%)
Same OS:4 (100.0%)
From: tv at solnet dot ch Assigned:
Status: Closed Package: Gettext related
PHP Version: 4.3.8 OS: Freebsd 4.10
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
36 - 8 = ?
Subscribe to this entry?

 [2004-07-27 15:47 UTC] tv at solnet dot ch
Fatal error: Call to undefined function: bind_textdomain_codeset() even if you have gettext enabled in php4. phpinfo() shows gettext enabled. Gettext is also isntalled in the code

Reproduce code:
        // Localisation
        $lclang = $LANG;
        if( $LANG == "de" ) $lclang = "C";
        setlocale( LC_ALL, "" );
        putenv( "LANG=$lclang" );
        putenv( "LANGUAGE=$lclang" );
        bind_textdomain_codeset( "solnetweb", "ISO8859-1" );
        bindtextdomain( "solnetweb", $_SERVER["DOCUMENT_ROOT"] . "/translations" );
        textdomain( "solnetweb" );

        // Remove used variables.
        unset( $lclang, $setlang );


Actual result:
Fatal error: Call to undefined function: bind_textdomain_codeset()


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-07-27 21:17 UTC] tv at solnet dot ch
I use gettext 0.13 with the system. The same 
configuration with php 
4.3.7 works fine. But with 4.3.8 this specified 
bind_textdomain_codeset() function 
does not work anymore.
 [2004-07-27 21:37 UTC] tv at solnet dot ch
It looks like a freebsd port issue only. It doesn't find 
the /usr/local/lib/  during the configure of 
php4-gettext. setenv LDFLAGS -L/usr/local/lib and 
recompiling of the php4-gettext port can fix this 
problem (tested on a 5.2.1 machine) 

Many thanks to Torsten Schneider.
 [2004-07-27 23:34 UTC]
And FWIW, from gettext.c source:

    PHP_NAMED_FE(bind_textdomain_codeset, zif_bind_textdomain_codeset,    NULL)
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Dec 06 06:03:37 2021 UTC