Thanks for the help.
I was able to work out the issue.
I had attempted to create a 5.1.4 php rpm for RHEL 4.
I found instructions here:
www.cyberciti.biz/tips/how-to-install-ph...terprise-linux4.html
One thing I did not realize is that the configure used in the rpm spec compiles '--without-pear'. The clue was an earlier post. I found this by creating a test.php file (see the ection test.php below). Look at the configure command section of the test.php.
In order to get everything to work I needed to change the php.spec file as follows:
- Change the configure command as listed below in section Configure. This setup will depend upon version and system config. The key here is '-with-pear'.
- Buried in the installation pear is accessed and attempts to download some things in to the install path. Since I am hidden behind a firewall I needed to set the http_proxy environment variable just before the execution of the 'build-cgi' section. See the Proxy section below.
- Since pear installs a few things not in previous versions you will need to remove those or the rpmbuild will error out. See the pear section below.
Once all that is done you can run the command ‘rpmbuild --bb php’ as listed in the instructions above. Afterwards I was able to install the package, restart httpd and suddenly I had access to nagiosQL3.0.
Hopefully, this will help others.
test.php
| Code: |
<?php phpinfo(); ?>
|
Configure
| Code: |
%configure \
--bindir=/usr/bin \
--cache-file=../config.cache \
--datadir=/usr/share \
--enable-dba \
--enable-debug \
--enable-dom \
--enable-pdo \
--disable-rpath \
--enable-xmlreader \
--enable-xmlwriter \
--enable-bcmath \
--enable-calendar \
--enable-dbx \
--enable-dio \
--enable-exif \
--enable-force-cgi-redirect \
--enable-ftp \
--enable-gd-native-ttf \
--enable-inline-optimization \
--enable-magic-quotes \
--enable-mbregex \
--enable-mbstr-enc-trans \
--enable-mbstring=shared \
--enable-memory-limit \
--enable-pic \
--enable-shmop \
--enable-sockets \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
--enable-track-vars \
--enable-trans-sid \
--enable-ucd-snmp-hack \
--enable-wddx \
--enable-yp \
--exec-prefix=/usr \
--includedir=/usr/include \
--infodir=/usr/share/info \
--libdir=/usr/lib \
--libexecdir=/usr/libexec \
--localstatedir=/var \
--mandir=/usr/share/man \
--prefix=/usr \
--program-prefix= \
--sbindir=/usr/sbin \
--sharedstatedir=/usr/com \
--sysconfdir=/etc \
--with-apxs2=/usr/sbin/apxs \
--with-BZ2 \
--with-config-file-path=/etc \
--with-config-file-scan-dir=/etc/php.d \
--with-curl \
--with-db4=/usr \
--with-dom=shared,/usr \
--with-dom-exslt=/usr \
--with-dom-xslt=/usr \
--with-exec-dir=/usr/bin \
--with-expat-dir=/usr \
--with-freetype-dir=/usr \
--with-gd=shared \
--with-gettext \
--with-gmp \
--with-iconv \
--with-imap-ssl \
--with-jpeg-dir=/usr \
--with-kerberos \
--with-layout=gnu \
--with-ldap=shared \
--with-libdir=lib \
--with-libxml-dir=/usr \
--with-mime-magic=/usr/share/file/magic.mime \
--with-mysql=shared,/usr \
--with-ncurses=shared \
--with-openssl \
--with-odbc \
--without-sqlite \
--with-pear=/usr/share/pear \
--with-pgsql=shared \
--with-pic \
--with-png \
--with-png-dir=/usr \
--with-pspell \
--with-snmp=shared \
--with-snmp=shared,/usr \
--with-unixODBC=shared,/usr \
--with-xml \
--with-xmlrpc=shared \
--with-zlib \
$*
|
Proxy
| Code: |
# Install everything from the CGI SAPI build
http_proxy="my.proxy.net:8080" ; export http_proxy
pushd build-cgi
make install INSTALL_ROOT=$RPM_BUILD_ROOT
mv $RPM_BUILD_ROOT%{_bindir}/php $RPM_BUILD_ROOT%{_bindir}/php-cgi
|
pear
| Code: |
# Remove irrelevant docs
rm -f README.{Zeus,QNX,CVS-RULES}
#par installation things
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT/.channels
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT/.depdb
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT/.depdblock
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT/.filemap
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT/.lock
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT/etc/pear.conf
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT/usr/bin/pear
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT/usr/bin/peardev
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT/usr/bin/pecl
%clean
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
rm files.*
|