By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,317 Members | 1,297 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,317 IT Pros & Developers. It's quick & easy.

Call to undefined function snmpget()

P: 4
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.
Mar 22 '10 #1
Share this Question
Share on Google+
3 Replies


Atli
Expert 5K+
P: 5,058
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.
Mar 22 '10 #2

P: 4
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...
Mar 23 '10 #3

P: 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..
Mar 25 '10 #4

Post your reply

Sign in to post your reply or Sign up for a free account.