Menu

i18n and user defined error handlers

i18n
2003-12-20
2004-01-15
  • Nobody/Anonymous

    Hi,

    the following error is not caused by i18n. It is caused by wrong user defined error handlers:

    Error-Message:
    dl(): Not supported in multithreaded Web servers - use extension statements in your php.ini in i18n\class.I18N.inc.php, line 187

    This message is only displayed if you have written an own error handler, which doesn't ignore errors which happen in lines like the following:
      @dl('shmop');

    You can fix this by add the following code at the top of your user defined error handling function:

    // handling of errors which was prepended
    // by the @ operator
    if( error_reporting() == 0 )
    {
       return; // exit function
    }

    see: php documentation, set_error_handler function

     
    • flaimo

      flaimo - 2003-12-20

      i suppose you mean version 1.0xx.
      there is no user error handler in this version. only trigger_error(... ,E_USER_WARNING) is used to show strings that could not be translated. this function is only used if $this->show_errormessages is TRUE and it can be used with the default php error handler.

       
    • Nobody/Anonymous

      I use the latest PHP4 version. AFAIK it is a 1.x version.

      I don't mean that i18n includes an error handler. But your script can be used from a php-script which have an user defined error handler which is corrupt. In that case the above error can be reported.

      I have used an error handler with such an bug on my website. Because of this I've got error-messages from i18n. After I have fixed my error handler all was ok.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.