[CentOS] PHP Extensions

Thu Jun 8 14:39:58 UTC 2006
Charles Lacroix <clacroix at cegep-ste-foy.qc.ca>

On Thursday 08 June 2006 10:01, Claudio Castro wrote:
> Charles Lacroix escribió:
> > On Thursday 08 June 2006 09:53, Claudio Castro wrote:
> >> Hi all,
> >>
> >> I have a problem, I'm running CentOS 4.3 and I just installed php with
> >> yum, later I realize that I nedd LDAP support so I download the php-ldap
> >> rpm with yum, everything was OK...but now..the problem is that I need
> >> Informix support, so I search for a php-ifx module to see if it
> >> exist...but no.
> >> So, what are my options? recompile a fresh new php with informix
> >> support...loosing the automatic updates with yum... or compile php with
> >> informix support in another machine and then copy the "informix.so" to
> >> "/usr/lib/php4/"? will that work?
> >>
> >>
> >> Claudio
> >> _______________________________________________
> >> CentOS mailing list
> >> CentOS at centos.org
> >> http://lists.centos.org/mailman/listinfo/centos
> >
> > Rebuild the php rpm with your changes and redo that operation on every
> > updates
>
> Is it too complicated? How do I rebuild the php rpm? I've installed php
> with yum..so no rpm is available.
>
> > _______________________________________________
> > CentOS mailing list
> > CentOS at centos.org
> > http://lists.centos.org/mailman/listinfo/centos
>
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos

It's not hard to do. 

Just get the rpm source froma mirror and install it. 

- mkdir -p /usr/src/redhat/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
- rpm -ihv php-4.x.x-src.rpm
- cd /usr/src/redhat/SPECS
- edit php.spec to add the --with-informix or whatever compilation flag you 
need.

save the file, than

rpmbuild -ba php.spec

it will compile and build everything and if no errors you will get a list of 
the new rpms in RPMS directory.

I hope this helps 

later
Charles