From Bugzilla Helper: User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705) Description of problem: When trying to call any snmp function in a PHP script, no output is produced and the following entry appears in the httpd error_log: /usr/sbin/httpd: relocation error: /usr/lib/php4/snmp.so: undefined symbol: sprint_value Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Use any snmp function in a php script
This problem still exists in 4.2.2-9
I appears this issue with the snmp module is fixed in 4.3.0, I hope we move to that soon.
Sorry getting forced off of redhat cause no fix in 3 months, oh well
Created attachment 89840 [details] Backport of SNMP module from php 4.3.0 (adds netsnmp support)
any chance of getting a binary?
*** Bug 78215 has been marked as a duplicate of this bug. ***
Thanks for the patch; it needed config.m4 fixes for the 4.2 tree, and I've rediffed against 4.3 tip for integration. This will be in 4.2.2-16.
php-4.2.2-16 available for testing, does this fix SNMP issues? http://people.redhat.com/jorton/Phoebe-php/
Where do I get libcrypto.so.4, libssl.so.4, etc
You'll have to "rpmbuild --rebuild" on the .src.rpm if you want to test them on a system not running the Phoebe beta.
Is there going to be a fix for the current release.
The following results while trying to rebuild with the command 'rpmbuild -- rebuild php-4.2.2-16.src.rpm' on Red Hat 8.0 will all available updates: Making all in snmp make[2]: Entering directory `/usr/src/redhat/BUILD/php-4.2.2/build-cgi/ext/snmp' make[3]: Entering directory `/usr/src/redhat/BUILD/php-4.2.2/build-cgi/ext/snmp' /bin/sh /usr/src/redhat/BUILD/php-4.2.2/build-cgi/libtool --silent -- mode=compile gcc -I. -I/usr/src/redhat/BUILD/php-4.2.2/ext/snmp - I/usr/src/redhat/BUILD/php-4.2.2/build-cgi/main -I/usr/src/redhat/BUILD/php- 4.2.2 -I/usr/src/redhat/BUILD/php-4.2.2/build-cgi/Zend - I/usr/local/openssl/include -I/usr/include/libxml2 - I/usr/include/freetype2/freetype -I/usr/include/imap -I/usr/include/mysql - I/usr/local/include -I/usr/include/pspell -I/usr/src/redhat/BUILD/php- 4.2.2/main -I/usr/src/redhat/BUILD/php-4.2.2/Zend -I/usr/src/redhat/BUILD/php- 4.2.2/TSRM -DUCD_COMPATIBLE -I/usr/src/redhat/BUILD/php-4.2.2/build-cgi/TSRM - O2 -march=i386 -mcpu=i686 -fPIC -prefer-pic -c /usr/src/redhat/BUILD/php- 4.2.2/ext/snmp/snmp.c && touch snmp.slo cc1: warning: changing search order for system directory "/usr/local/include" cc1: warning: as it has already been specified as a non-system directory /usr/src/redhat/BUILD/php-4.2.2/ext/snmp/snmp.c: In function `netsnmp_session_gen_auth_key': /usr/src/redhat/BUILD/php-4.2.2/ext/snmp/snmp.c:675: warning: initialization discards qualifiers from pointer target type /usr/src/redhat/BUILD/php-4.2.2/ext/snmp/snmp.c: In function `netsnmp_session_gen_sec_key': /usr/src/redhat/BUILD/php-4.2.2/ext/snmp/snmp.c:704: warning: initialization discards qualifiers from pointer target type /bin/sh /usr/src/redhat/BUILD/php-4.2.2/build-cgi/libtool --silent --mode=link gcc -I. -I/usr/src/redhat/BUILD/php-4.2.2/ext/snmp -I/usr/src/redhat/BUILD/php- 4.2.2/build-cgi/main -I/usr/src/redhat/BUILD/php-4.2.2 - I/usr/src/redhat/BUILD/php-4.2.2/build-cgi/Zend -I/usr/local/openssl/include - I/usr/include/libxml2 -I/usr/include/freetype2/freetype -I/usr/include/imap - I/usr/include/mysql -I/usr/local/include -I/usr/include/pspell - I/usr/src/redhat/BUILD/php-4.2.2/main -I/usr/src/redhat/BUILD/php-4.2.2/Zend - I/usr/src/redhat/BUILD/php-4.2.2/TSRM -DUCD_COMPATIBLE - I/usr/src/redhat/BUILD/php-4.2.2/build-cgi/TSRM -O2 -march=i386 -mcpu=i686 - fPIC -L/usr/kerberos/lib -o snmp.la -avoid-version -module - rpath /usr/src/redhat/BUILD/php-4.2.2/build-cgi/modules snmp.lo -lm -lelf - lcrypto -lnetsnmp /usr/bin/ld: cannot find -lelf collect2: ld returned 1 exit status make[3]: *** [snmp.la] Error 1 make[3]: Leaving directory `/usr/src/redhat/BUILD/php-4.2.2/build-cgi/ext/snmp' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/usr/src/redhat/BUILD/php-4.2.2/build-cgi/ext/snmp' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr/src/redhat/BUILD/php-4.2.2/build-cgi/ext' make: *** [all-recursive] Error 1 error: Bad exit status from /var/tmp/rpm-tmp.30602 (%build) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.30602 (%build) libelf-0.8.2-2 is installed lrwxrwxrwx 1 root root 15 Sep 30 02:43 /usr/lib/libelf.so.0 -> libelf.so.0.8.2 -rwxr-xr-x 1 root root 95162 Aug 26 10:11 /usr/lib/libelf.so.0.8.2
Installing the following Rawhide RPMS on an 8.0 box satisfies the dependencies of the binaries Joe provided: openssl096b-0.9.6b-1.i386.rpm openssl-0.9.7-2.i386.rpm openssl-devel-0.9.7-2.i386.rpm With these and the php-4.2.2-16 RPMS installed, snmp functions appear to be working.
appears to be working for me too!
The patch to make php-snmp use net-snmp is having nasty side-effects, causing segfaults on server startup in some builds (the addition of the "init_snmp()" looks like the trigger). I've had to revert it for the time being, leaving just minimal fixes to the snmp module, until this can be investigated further.
An errata has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2003-204.html