Please look at the bottom of this tread. To have php-xslt available, there's no need to compile the packages yourself: just install the RPMs (see below).For our web server we need the XSLT transformations which are not supplied with CentOS. Therefore, I had to make it myself

Here's a short description of what I did.
First you need to add some 3rd party yum repositories. See:
http://no.longer.valid/phpwiki/index.php/3rdPartyYumRepositories for that.
The compile you also need the devtools for sme7. I have used:
wget http://mirror.contribs.org/smeserver/contribs//hmuhammad/install-devtools-7.0.sh
bash ./install-devtools-7.0.sh
You also need to patch the source code of php and the spec file that comes with the src rpm of php:
Create the file php.spec.patch:
*** /usr/src/redhat/SPECS/php.spec.orig 2005-11-04 17:32:09.000000000 +0100
--- /usr/src/redhat/SPECS/php.spec 2006-04-13 13:42:32.000000000 +0200
***************
*** 2,7 ****
--- 2,9 ----
%define with_oci8 %{?_with_oci8:1}%{!?_with_oci8:0}
%define with_mssql %{?_with_mssql:1}%{!?_with_mssql:0}
%define with_mhash %{?_with_mhash:1}%{!?_with_mhash:0}
+ # Portions (c) 2005 PD Inc http://www.pdinc.us LICENSE 20050531P00
+ %define xslt 1
Summary: The PHP HTML-embedded scripting language. (PHP: Hypertext Preprocessor)
Name: php
***************
*** 63,68 ****
--- 65,73 ----
Patch81: php-4.3.9-CVE-2005-3388.patch
Patch82: php-4.3.9-CVE-2005-3353.patch
+ # Skip pspell test
+ Patch90: php-4.3.9-pspell-skip-tests.patch
+
BuildRoot: %{_tmppath}/%{name}-root
BuildRequires: bzip2-devel, curl-devel >= 7.9, db4-devel, expat-devel
***************
*** 202,207 ****
--- 207,227 ----
support for accessing OCI8 databases to PHP.
%endif
+ %if %{xslt}
+ %package xslt
+ Group: Development/Languages
+ Summary: A module for PHP applications that use Sablotron XSLT.
+ BuildRequires: js, js-devel, sablotron, sablotron-devel
+ Requires: php = %{version}-%{release}
+ # why does this get AutoReq 0?
+ AutoReq: 0
+ Requires: js, sablotron
+
+ %description xslt
+ This PHP extension provides an API to XSLT transformations. Currently this extension only supports the
+ Sablotron library from the Ginger Alliance.
+ %endif
+
%if %{with_mssql}
%package mssql
Group: Development/Languages
***************
*** 332,337 ****
--- 352,359 ----
%patch81 -p1 -b .cve3388
%patch82 -p1 -b .cve3353
+ %patch90 -p1 -b .pspelltests
+
# Prevent %%doc confusion over LICENSE files
cp Zend/LICENSE Zend/ZEND_LICENSE
cp TSRM/LICENSE TSRM_LICENSE
***************
*** 433,438 ****
--- 455,465 ----
--enable-sysvshm \
--enable-track-vars \
--enable-trans-sid \
+ %if %{xslt}
+ --enable-xslt=shared \
+ --with-xslt-sablot=shared \
+ --with-sablot-js=shared \
+ %endif
--enable-yp \
--enable-wddx \
--with-pear=/usr/share/pear \
***************
*** 521,526 ****
--- 548,554 ----
# Generate files lists and stub .ini files for each subpackage
for mod in pgsql mysql odbc ldap snmp domxml xmlrpc imap \
mbstring ncurses gd \
+ %{?xslt:xslt} \
%{?_with_oci8:oci8} %{?_with_mssql:mssql} %{?_with_mhash:mhash}; do
cat > $RPM_BUILD_ROOT%{_sysconfdir}/php.d/${mod}.ini <<EOF
; Enable ${mod} extension module
***************
*** 590,595 ****
--- 618,627 ----
%files oci8 -f files.oci8
%endif
+ %if %{xslt}
+ %files xslt -f files.xslt
+ %endif
+
%if %{with_mssql}
%files mssql -f files.mssql
%endif
And the file php-4.3.9-pspell-skip-tests.patch
*** php-4.3.9/ext/pspell/tests/01pspell_basic.phpt.org 2006-04-13 13:26:17.000000000 +0200
--- php-4.3.9/ext/pspell/tests/01pspell_basic.phpt 2006-04-13 12:44:52.000000000 +0200
***************
*** 2,8 ****
pspell basic tests (warning: may fail with pspell/aspell < GNU Aspell 0.50.3)
--SKIPIF--
<?php
! if (!extension_loaded("pspell")) print "skip";
if (!@pspell_new ("en", "", "", "", (PSPELL_FAST|PSPELL_RUN_TOGETHER))) {
die("skip English dictionary is not avaliable");
}
--- 2,8 ----
pspell basic tests (warning: may fail with pspell/aspell < GNU Aspell 0.50.3)
--SKIPIF--
<?php
! if (1 || !extension_loaded("pspell")) print "skip";
if (!@pspell_new ("en", "", "", "", (PSPELL_FAST|PSPELL_RUN_TOGETHER))) {
die("skip English dictionary is not avaliable");
}
Then execute the following script
yum install --enablerepo=\* install expat-devel js-devel ncurses-devel readline-devel
# Download Sablotron source RPM from dags repository.
wget http://dag.wieers.com/packages/sablotron/sablotron-1.0.2-1.rf.src.rpm
# Install the sablotron source RPM and remove "--with-readline" from the spec file.
rpm -ivh sablotron-1.0.2-1.rf.src.rpm
cp /usr/src/redhat/SPECS/sablotron.spec /usr/src/redhat/SPECS/sablotron.spec.org
cat /usr/src/redhat/SPECS/sablotron.spec.org | sed -e 's/--with-readline//' > \
/usr/src/redhat/SPECS/sablotron.spec
# Build and install sablotron and sablotron-devel packages
rpmbuild -bb /usr/src/redhat/SPECS/sablotron.spec
yum localinstall /usr/src/redhat/RPMS/i386/sablotron-*.rpm
# Download the php source RPM from Redhat.
wget ftp://ftp.redhat.com/pub/redhat/linux/updates/enterprise/4WS/en/os/SRPMS/php-4.3.9-3.9.src.rpm
# Install the php source RPM and add, "--enable-xslt --with-xslt-sablot --with-sablot-js=%{_prefix}" to the spec file.
rpm -ivh php-4.3.9-3.9.src.rpm
# Add a patch to skip the pspell tests produce an compile error on my machine
cp php-4.3.9-pspell-skip-tests.patch /usr/src/redhat/SOURCES
# Patch the spec file with a patch downloaded from: https://bugzilla.redhat.com/bugzilla/attachment.cgi?id=115311
cd /usr/src/redhat/SPECS/
patch -b -p0 < php.spec.patch
# Try to build the php package and force install the of missing packages (mostly -devel packages).
for package in rpmbuild -bb /usr/src/redhat/SPECS/php.spec 2>&1 | awk '{ print $1; }'; do \
echo $package needs to be installed; yum -y --enablerepo=base install $package; done
# The above succeeds, except for aspell-devel. We need to rebuild this as well
wget http://mirror.contribs.org/smeserver/releases/7/builds/rpms/SRPMS/aspell-0.60.3-2.src.rpm
rpm -ivh aspell-0.60.3-2.src.rpm
rpmbuild -bb /usr/src/redhat/SPECS/aspell.spec
yum localinstall /usr/src/redhat/RPMS/i386/aspell-devel*.rpm
rpmbuild -bb /usr/src/redhat/SPECS/php.spec
# Install the newly build package
yum localinstall /usr/src/redhat/RPMS/i386/php-xslt-4.3.9-3.9.i386.rpm
# The next is not strictly necessary:
rpm -ivh --force /usr/src/redhat/RPMS/i386/php-4.3.9-3.9.i386.rpm
This should do the job. I hope this is useful to the SME community.
Regards, Ard