PHP with Informix IDS support via IFX Module – Centos5 / RHEL5 12 June 2007
Posted by Maulvi Bakar in : Linux, Work , 1 comment so farHello everyone, sorry for the long silence..
These are drafts mainly, careful with the syntax until I fix the coding code of my wordpress.. ![]()
Firstly, install the Informix Client SDK for Linux..
Get the Client SDK from here – http://www-306.ibm.com/software/data/informix/linux/csdk.html
Download, untar it to a folder, then follow the instructions below -
# useradd informix
# passwd informix./installclientsdk
install to /opt/IBM/informix
ensure “/etc/hosts” have these entry -
x.x.x.x informix_server_hostname
ensure that “/opt/IBM/informix/etc/sqlhost” have these entry -
database_instance_name onsoctcp informix_server_hostname 9088
add these at line number 38 in file “/etc/init.d/httpd”, which should be before the “# check for 1.3 configuration” line -
export INFORMIXDIR=/opt/IBM/informix
export INFORMIXSERVER=mtx2informix_prod
export ONCONFIG=onconfig
export PATH=$PATH:$INFORMIXDIR/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INFORMIXDIR/lib:$INFORMIXDIR/lib/esql
Download this -
http://ftp.redhat.com/pub/redhat/linux/enterprise/5Server/en/os/SRPMS/php-5.1.6-5.el5.src.rpm
and install it
rpm -ivh php-5.1.6-5.el5.src.rpm
go to /usr/src/redhat/SPECS/
edit the php.spec file at line 428 (approximately after the xml, before $*, add this line -
–with-informix=/opt/IBM/informix \
Then, run this command -
rpmbuild -ba php.spec
and also, prior to rebuilding the RPM, may need to export the environments -
export INFORMIXDIR=/opt/IBM/informix
export INFORMIXSERVER=mtx2informix_prod
export ONCONFIG=onconfig
export PATH=$PATH:$INFORMIXDIR/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INFORMIXDIR/lib:$INFORMIXDIR/lib/esql
Run this command to identify whatever php packages that you’ve installed -
rpm -qa | grep php
uninstall them using this command
rpm -e package_name1 package_name2
and re-install them using newly recompiled RPMs from this location -
“/usr/src/redhat/RPMS/i386/”
May need to use “–nodeps” option – the .so files required are actually Informix libraries already found within the ld_library_lib path
Hope it is useful to someone else someday