Bug 123149 - RFE: include php-snmp subpackage
RFE: include php-snmp subpackage
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: distribution (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Riek
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2004-05-12 23:03 EDT by Sean Scott
Modified: 2008-08-02 19:40 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-08-02 12:36:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Sean Scott 2004-05-12 23:03:50 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET 
CLR 1.1.4322)

Description of problem:
Since migrating to RHEL 3 from standard RedHat Linux I have found 
that php-snmp (and many of the -devel packages I frequently use) are 

I am unable to move some of my systems to RHEL 3 until a php-snmp 
package is available or manbual compile is possible as it is a 
dependencies of many of the applications I run.

I cannot compile the module seperately as the php_config file seems 
to be deleted.  The spec file for php indicates this is done post 

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
while compiling rrd-php and php-snmp with ./configure & make & make 
install the compile terminates while looking for php_config

Additional info:
Comment 1 Joe Orton 2004-05-13 05:07:16 EDT
Thanks for the report.  Bug 109697 is the RFE for inclusion of php-devel.
Comment 2 Gabriel Preston 2004-09-15 10:36:04 EDT
Unfortunately, that RFE for the inclusion of php-devel does not seem 
to do anything about the problem regarding the php-snmp package.

We have several systems here (six at the moment) that currently run 
RH7.3 that make use of the php-snmp package.  We currently have eight 
new servers sitting here that we have installed RHEL3 on with plans 
of replacing the older servers.  And much to my dismay, we can't go 
through with the installation because the servers are useless without 
the ability to run the plethera of scripts that make use of PHP's 
SNMP functions.

Has there been any work done on including php-snmp with the RHEL3 
Channels, or is this package dropped for good?
Comment 3 Dan Eggleston 2004-09-17 11:00:18 EDT
We had the exact same problem - we really need php-snmp on RHEL3! Best
I could manage was to either use one of the recent Fedora php-snmp
rpms which seem to work (despite being compiled against a newer PHP
version!), or build the shared object one from the non-Red Hat php source:

1. ensure the net-snmp-devel and elfutils-libelf-devel packages are
2. get the full 4.3.2 source from http://www.php.net/releases.php
3. go to the ext/snmp directory and run...
#./configure --enable-shared
#make install

this builds just the snmp extension and leaves the rest of your Red
Hat php installation alone. Hey presto, you should have a working
/usr/lib/php4/snmp.so. Not perfect I know, but needs must... :-)
Comment 4 Gabriel Preston 2004-09-20 08:51:41 EDT
I used the following method to get php-snmp working with 4.3.2-14:

1) Make the required RPM directory structure to rebuild with
	useradd -d /home/rpmbuild -m rpmbuild
	echo "%_topdir /home/rpmbuild/rpm" > /home/rpmbuild/.rpmmacros
	echo "%_tmppath /home/rpmbuild/rpm/tmp" 
>> /home/rpmbuild/.rpmmacros
	su - rpmbuild
	mkdir rpm; cd rpm;
	cd ..

2) Download the latest Source RPM (SRPM) from a mirror and rebuild
	rpmbuild --recompile php-VERSION.src.rpm

3) Apply php-snmp patch to php.spec file
   Edit php.spec file by hand
	patch rpm/SPECS/php.spec php-snmp.diff
	vi rpm/SPECS/php.spec

4) Rebuild the SRPM with the new php.spec file
	rpmbuild -ba rpm/SPECS/php.spec

5) Install the newly created php-snmp-VERSION.rpm
	rpm -i rpm/RPMS/i386/php-snmp-VERSION.ent.i386.rpm

6) Restart Apache
	/etc/init.d/httpd restart

BEGIN php-snmp.diff patch
NOTE: This patch applies to 4.3.2-14 version of
      the PHP RPM and may require modification
      or rebuilding to work on future versions
--- php.spec.orig	2004-09-16 08:46:30.000000000 +0200
+++ php.spec	2004-09-16 09:17:46.000000000 +0200
@@ -157,6 +157,18 @@
 applications, you will need to install this package and the php
+%package snmp
+Group: Development/Languages
+Requires: php = %{version}-%{release}
+Summary: A module for PHP applications that query SNMP-managed 
+BuildRequires: net-snmp-devel
+%description snmp
+The php-snmp package contains a dynamic shared object that will add
+support for querying SNMP devices to PHP.  PHP is an HTML-embeddable
+scripting language. If you need SNMP support for PHP applications, 
+will need to install this package and the php package.
 %if %{oracle}
 %package oci8
 Group: Development/Languages
@@ -331,6 +343,7 @@
 	--enable-dbx \
 	--enable-dio \
 	--enable-mcal \
+	--with-snmp=shared \
 	$* || tail -200 config.log
 make %{?_smp_mflags}
@@ -387,7 +400,7 @@
 # Generate files lists and stub .ini files for each subpackage
-for mod in pgsql mysql odbc imap ldap ${ocimod}; do
+for mod in pgsql mysql odbc imap ldap ${ocimod} snmp; do
     cat > $RPM_BUILD_ROOT%{_sysconfdir}/php.d/${mod}.ini <<EOF
 ; Enable ${mod} extension module
@@ -449,6 +462,8 @@
 %files ldap -f files.ldap
+%files snmp -f files.snmp
 * Mon Jul 12 2004 Joe Orton <jorton@redhat.com> 4.3.2-14.ent
 - have -devel require php of same release
      END php-snmp.diff patch
Comment 6 David Lawrence 2006-03-10 12:08:49 EST
NEEDINFO_PM has been deprecated. Changing status to NEEDINFO and changing
ownership to pm manager.
Comment 7 Daniel Riek 2006-08-02 12:33:33 EDT
After carefully evaluating the benefits from adding this package in an update
release versus the additional work, Product Management decided to decline this
request. We are planning on adding iptraf to the next major version Red Hat
Enterprise Linux 5.
Comment 8 RHEL Product and Program Management 2006-08-02 12:36:22 EDT
Product Management has reviewed and declined this request.  You may appeal this decision by reopening this request.

Note You need to log in before you can comment on or make changes to this bug.