SNMP is not supported by your PHP installation.

deltaned

Verified User
Joined
Jan 23, 2004
Messages
102
Hi,

For a script I need the SNMP module from PHP.
As: http://help.directadmin.com/item.php?id=23 I add into: configure.php the line: --with-snmp \

After ./build php I get the error:
checking for SNMP support... yes
checking OpenSSL dir for SNMP... no
checking for net-snmp-config... no
configure: error: snmp.h not found. Check your SNMP installation.

*** There was an error while trying to configure php. Check the configure.php file

Any tips to get this module installed?
 
I'm running Centos 3.3 and installed the net-snmp-* packages via yum.

To get php built, I needed to use

Code:
--with-snmp=shared,/usr/include/ucd-snmp
--enable-ucd-snmp-hack

HTH,
Allyn
 
checking for SNMP support... yes, shared
checking OpenSSL dir for SNMP... no
checking for default_store.h... no

checking for kstat_read in -lkstat... no
checking for snmp_parse_oid in -lsnmp... no
checking for init_snmp in -lsnmp... no
configure: error: SNMP sanity check failed. Please check config.log for more information.

*** There was an error while trying to configure php. Check the configure.php file

The configlog is attached
 

Attachments

  • config_php.txt
    59.7 KB · Views: 858
it is fedora core 2 OS.
Yum can`t find the snmp-libs and snmp-devel
I install snmp-devel with yum, but the libs is missing.
I get now after: ./build php

/usr/local/directadmin/customapache/php-4.3.10/ext/snmp/snmp.c:859: error: dereferencing pointer to incomplete type
/usr/local/directadmin/customapache/php-4.3.10/ext/snmp/snmp.c:859: error: dereferencing pointer to incomplete type
/usr/local/directadmin/customapache/php-4.3.10/ext/snmp/snmp.c:859: error: `SNMPERR_SUCCESS' undeclared (first use in this function)
/usr/local/directadmin/customapache/php-4.3.10/ext/snmp/snmp.c: In function `php_snmpv3':
/usr/local/directadmin/customapache/php-4.3.10/ext/snmp/snmp.c:886: error: storage size of `session' isn't known
/usr/local/directadmin/customapache/php-4.3.10/ext/snmp/snmp.c:887: error: `SNMP_DEFAULT_TIMEOUT' undeclared (first use in this function)
/usr/local/directadmin/customapache/php-4.3.10/ext/snmp/snmp.c:888: error: `SNMP_DEFAULT_RETRIES' undeclared (first use in this function)
/usr/local/directadmin/customapache/php-4.3.10/ext/snmp/snmp.c:892: error: `MAX_NAME_LEN' undeclared (first use in this function)
/usr/local/directadmin/customapache/php-4.3.10/ext/snmp/snmp.c:903: error: `SNMP_VERSION_3' undeclared (first use in this function)
make: *** [ext/snmp/snmp.lo] Error 1

I find a rpm of SNMP-LIBS but all RPM`s give: rpm -Uvh net-snmp-5.2.1-3.fc2.i686.rpm
Preparing... ########################################### [100%]
file /usr/bin/net-snmp-config from install of net-snmp-5.2.1-3 conflicts with file from package net-snmp-devel-5.1.1-2
file /usr/lib/libnetsnmp.so from install of net-snmp-5.2.1-3 conflicts with file from package net-snmp-devel-5.1.1-2
file /usr/lib/libnetsnmpagent.so from install of net-snmp-5.2.1-3 conflicts with file from package net-snmp-devel-5.1.1-2
file /usr/lib/libnetsnmphelpers.so from install of net-snmp-5.2.1-3 conflicts with file from package net-snmp-devel-5.1.1-2
file /usr/lib/libnetsnmpmibs.so from install of net-snmp-5.2.1-3 conflicts with file from package net-snmp-devel-5.1.1-2
file /usr/lib/libnetsnmptrapd.so from install of net-snmp-5.2.1-3 conflicts with file from package net-snmp-devel-5.1.1-2
file /usr/share/man/man3/default_store.3.gz from install of net-snmp-5.2.1-3 conflicts with file from package net-snmp-devel-5.1.1-2
file /usr/share/man/man3/mib_api.3.gz from install of net-snmp-5.2.1-3 conflicts with file from package net-snmp-devel-5.1.1-2
file /usr/share/man/man3/netsnmp_Container_iterator.3.gz from install of net-snmp-5.2.1-3 conflicts with file from package net-snmp-devel-5.1.1-2
file /usr/share/man/man3/netsnmp_agent.3.gz from install of net-snmp-5.2.1-3 conflicts with file from package net-snmp-devel-5.1.1-2
file /usr/share/man/man3/netsnmp_baby_steps.3.gz from install of net-snmp-5.2.1-3 conflicts with file from package net-snmp-devel-5.1.1-2
file /usr/share/man/man3/netsnmp_bulk_to_next.3.gz from install of net-snmp-5.2.1-3 conflicts with file from package net-snmp-devel-5.1.1-2
file /usr/share/man/man3/netsnmp_cache_handler.3.gz from install of net-snmp-5.2.1-3 conflicts with file from package net-snmp-devel-5.1.1-2
file /usr/share/man/man3/netsnmp_container.3.gz from install of net-snmp-5.2.1-3 conflicts with file from package net-snmp-devel-5.1.1-2
file /usr/share/man/man3/netsnmp_debug.3.gz from install of net-snmp-5.2.1-3 conflicts with file from package net-snmp-devel-5.1.1-2
file /usr/share/man/man3/netsnmp_handler.3.gz from install of net-snmp-5.2.1-3 conflicts with file from package net-snmp-devel-5.1.1-2
file /usr/share/man/man3/netsnmp_instance.3.gz from install of net-snmp-5.2.1-3 conflicts with file from package net-snmp-devel-5.1.1-2
file /usr/share/man/man3/netsnmp_iterator_info_s.3.gz from install of net-snmp-5.2.1-3 conflicts with file from package net-snmp-devel-5.1.1-2
file /usr/share/man/man3/netsnmp_leaf.3.gz from install of net-snmp-5.2.1-3 conflicts with file from package net-snmp-devel-5.1.1-2
file /usr/share/man/man3/netsnmp_library.3.gz from install of net-snmp-5.2.1-3 conflicts with file from package net-snmp-devel-5.1.1-2
file /usr/share/man/man3/netsnmp_mib_utilities.3.gz from install of net-snmp-5.2.1-3 conflicts with file from package net-snmp-devel-5.1.1-2
file /usr/share/man/man3/netsnmp_mode_end_call.3.gz from install of net-snmp-5.2.1-3 conflicts with file from package net-snmp-devel-5.1.1-2
file /usr/share/man/man3/netsnmp_multiplexer.3.gz from install of net-snmp-5.2.1-3 conflicts with file from package net-snmp-devel-5.1.1-2
file /usr/share/man/man3/netsnmp_old_api.3.gz from install of net-snmp-5.2.1-3 conflicts with file from package net-snmp-devel-5.1.1-2
file /usr/share/man/man3/netsnmp_read_only.3.gz from install of net-snmp-5.2.1-3 conflicts with file from package net-snmp-devel-5.1.1-2
file /usr/share/man/man3/netsnmp_row_merge.3.gz from install of net-snmp-5.2.1-3 conflicts with file from package net-snmp-devel-5.1.1-2
file /usr/share/man/man3/netsnmp_scalar.3.gz from install of net-snmp-5.2.1-3 conflicts with file from package net-snmp-devel-5.1.1-2
file /usr/share/man/man3/netsnmp_scalar_group_group.3.gz from install of net-snmp-5.2.1-3 conflicts with file from package net-snmp-devel-5.1.1-2
file /usr/share/man/man3/netsnmp_serialize.3.gz from install of net-snmp-5.2.1-3 conflicts with file from package net-snmp-devel-5.1.1-2
file /usr/share/man/man3/netsnmp_stash_cache.3.gz from install of net-snmp-5.2.1-3 conflicts with file from package net-snmp-devel-5.1.1-2
file /usr/share/man/man3/netsnmp_table.3.gz from install of net-snmp-5.2.1-3 conflicts with file from package net-snmp-devel-5.1.1-2
file /usr/share/man/man3/netsnmp_table_array.3.gz from install of net-snmp-5.2.1-3 conflicts with file from package net-snmp-devel-5.1.1-2
file /usr/share/man/man3/netsnmp_table_data.3.gz from install of net-snmp-5.2.1-3 conflicts with file from package net-snmp-devel-5.1.1-2
file /usr/share/man/man3/netsnmp_table_dataset.3.gz from install of net-snmp-5.2.1-3 conflicts with file from package net-snmp-devel-5.1.1-2
file /usr/share/man/man3/netsnmp_table_iterator.3.gz from install of net-snmp-5.2.1-3 conflicts with file from package net-snmp-devel-5.1.1-2
file /usr/share/man/man3/netsnmp_utilities.3.gz from install of net-snmp-5.2.1-3 conflicts with file from package net-snmp-devel-5.1.1-2
file /usr/share/man/man3/netsnmp_watcher.3.gz from install of net-snmp-5.2.1-3 conflicts with file from package net-snmp-devel-5.1.1-2
file /usr/share/man/man3/snmp_agent_api.3.gz from install of net-snmp-5.2.1-3 conflicts with file from package net-snmp-devel-5.1.1-2
file /usr/share/man/man3/snmp_alarm.3.gz from install of net-snmp-5.2.1-3 conflicts with file from package net-snmp-devel-5.1.1-2
file /usr/share/man/man3/snmp_api.3.gz from install of net-snmp-5.2.1-3 conflicts with file from package net-snmp-devel-5.1.1-2
file /usr/share/man/man3/snmp_sess_api.3.gz from install of net-snmp-5.2.1-3 conflicts with file from package net-snmp-devel-5.1.1-2
file /usr/share/man/man3/snmp_trap_api.3.gz from install of net-snmp-5.2.1-3 conflicts with file from package net-snmp-devel-5.1.1-2


What and where are the right RPM`s to install the both options?
 
Last edited:
Not sure about FC... I'm running an snmp 5.0.9 flavor.

Also, I went back to my notes... I also had to do a

Code:
export CFLAGS="-I/usr/include/ucd-snmp -DUCD_COMPATIBLE" && ./build_php_ap2 n
 
Back
Top