Menu

Install problem: Cannot redeclare gettext()

Help
stinker
2005-11-21
2012-10-11
  • stinker

    stinker - 2005-11-21

    I'm getting the error msg

    Fatal error: Cannot redeclare gettext() (previously declared in /opt/apache/htdocs/cswiki/lib/IniConfig.php:682) in /opt/apache/htdocs/cswiki/lib/IniConfig.php on line 682

    Trying to install phpwiki-1.3.11p1 on a linux box.

    Running:
    PHP 5.0.4
    MySQL 4.1.12-standard

    Line 682 of IniConfig.php is:

        function gettext ($text) {
            global $locale;
            if (!empty ($locale[$text]))
                return $locale[$text];
            return $text;
        }
    

    I tried commenting this out, but didn't work.

    Ideas?

    TIA.

     
    • CyberLeo Kitsana

      For me, at least, this is due to the IniConfig() function loading the settings in config-dist.ini after loading config.ini. This causes fixup_dynamic_configs() to be called twice, which tries to define gettext() again. I removed config-dist.ini and the problem went away.

      Apache/2.0.51
      PHP/4.3.11

       
    • Joel Uckelman

      Joel Uckelman - 2005-11-23

      In what way didn't it work when you commented it out?

       

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.