Call to undefined function snmpget()

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • achalsaraiya
    New Member
    • Mar 2010
    • 4

    Call to undefined function snmpget()

    I am using "PHP 5.2.4 (cli) (built: Nov 17 2009 16:22:15)" build, apache 2.
    when i am executing the php script with snmpget() function it works fine, while when i ran it through web it gives "Call to undefined function snmpget()" error.
  • Atli
    Recognized Expert Expert
    • Nov 2006
    • 5062

    #2
    Hey.

    The server that is giving you that error most likely doesn't have the SNMP extension installed. To use the function you need to install the extension.

    See the manual for installation instructions. If you are using a hosting service, you will have to ask your host to install this.

    Comment

    • achalsaraiya
      New Member
      • Mar 2010
      • 4

      #3
      Hi Atli,
      thanks for quick reply, in my machine we have installed using rpm, so i installed one rpm relevent to snmp and php, then also it gave same problem as before, it runs fine when php script is executed from terminal, but gives call to undefine function snmpget() when it is run from browser its web..

      So what i belive that snmp package of php is running fine, but is it possible that the problem is between interface with apache and php, or like apache has not appropriate rights to call this function?

      Thanks ones gain for your reply...

      Comment

      • achalsaraiya
        New Member
        • Mar 2010
        • 4

        #4
        Hi,
        My problem is resolved, i had build php using new source code and build using following parameters

        ./configure --enable-ucd-snmp-hack --with-openssl=/usr --with-snmp and my problem got solve, previously i was building only with

        ./configure --enable-ucd-snmp-hack --with-openssl=/usr

        Thanks Atli for your quick response..

        Comment

        Working...