PHP on command line issues: Function registration failed - duplicate name

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • news@celticbear.com

    PHP on command line issues: Function registration failed - duplicate name

    I just upgraded to PHP 4.4.2 on my Slackware 10.2 system. And
    Apache/mySQL/PHP all work great through a browser. No errors.
    But when I try to run a PHP script through the command line, which I
    need to do, I get blocks of errors like:

    root@slackserve :/var/www/htdocs# php ./phptest.php
    PHP Warning: Unknown(): Unable to load dynamic library
    '/usr/lib/php/extensions/mysql.so' - libmysqlclient. so.14: cannot open
    shared object file: No such file or directory in Unknown on line 0
    PHP Warning: Function registration failed - duplicate name -
    textdomain in Unknown on line 0
    PHP Warning: Function registration failed - duplicate name - gettext
    in Unknown on line 0
    PHP Warning: Function registration failed - duplicate name - _ in
    Unknown on line 0
    PHP Warning: Function registration failed - duplicate name - dgettext
    in Unknown on line 0
    PHP Warning: Function registration failed - duplicate name - dcgettext
    in Unknown on line 0
    PHP Warning: Function registration failed - duplicate name -
    bindtextdomain in Unknown on line 0
    PHP Warning: Function registration failed - duplicate name - ngettext
    in Unknown on line 0
    PHP Warning: Function registration failed - duplicate name - dngettext
    in Unknown on line 0
    PHP Warning: Function registration failed - duplicate name -
    dcngettext in Unknown on line 0
    PHP Warning: Function registration failed - duplicate name -
    bind_textdomain _codeset in Unknown on line 0
    PHP Warning: gettext: Unable to register functions, unable to load in
    Unknown on line 0

    Even so, it WILL actually spit out the proper data at the end. So, it's
    technically working, but preceded by all these errors.
    mysql.so is in the extensions dir just fine. And php.ini have no
    references in it anywhere to any of these other items mentioned.

    Any pointers on what I should look into here?
    Thanks!
    -Liam

  • Chung Leong

    #2
    Re: PHP on command line issues: Function registration failed - duplicate name

    Looks like both the MySQL and gettext extensions were compiled
    statically into the PHP binary. Those errors probably are triggered too
    when Apache starts--you just don't see them. Edit php.ini and comment
    out these two extensions. Then check phpinfo() through your browser to
    see if they're still active.

    Comment

    • news@celticbear.com

      #3
      Re: PHP on command line issues: Function registration failed - duplicate name


      Chung Leong wrote:[color=blue]
      > Looks like both the MySQL and gettext extensions were compiled
      > statically into the PHP binary. Those errors probably are triggered too
      > when Apache starts--you just don't see them. Edit php.ini and comment
      > out these two extensions. Then check phpinfo() through your browser to
      > see if they're still active.[/color]

      Oh dear, that's it.
      I wouldn't have expected that that was the problem and removing the
      lines the fix. Counter-intuitive.
      Thanks for the help!
      -Liam

      Comment

      Working...