php.net |  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
Votes:4
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
 [2004-07-27 15:47 UTC] tv at solnet dot ch
Description:
------------
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:
---------------
<?php
        // 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()

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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/libintl.so  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] philip@php.net
And FWIW, from gettext.c source:

#if HAVE_BIND_TEXTDOMAIN_CODESET
    PHP_NAMED_FE(bind_textdomain_codeset, zif_bind_textdomain_codeset,    NULL)
#endif
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 03:01:29 2024 UTC