Results 1 to 8 of 8
-
11-29-2006, 08:20 AM #1New Member
- Join Date
- Mar 2006
- Posts
- 4
Reconfigure PHP5 on cPanel Server
I have PHP 5.2.0 installed on my cPanel dedicated server (by using the apache update under WHM)
I am now trying to use the XSL Functions in PHP5 (http colon slash slash au2.php.net/manual/en/ref.xsl.php), but I get an error -Fatal error: Class 'XSLTProcessor' not found in /home/username/public_html/scriptname.php on line 6According to the PHP documentation, I just need to add "--with-xsl" to the configure line.
This doesn't seem to be possible using "apache update" under WHM, so I'm trying to do it from the commandline, but cannot seem to get it to work. Here is what I am doing, can anyone tell me what I'm doing wrong?- I got the configure command from phpinfo() -
'./configure' '--with-apxs=/usr/local/apache/bin/apxs' '--prefix=/usr/local' '--with-xml' '--enable-bcmath' '--enable-calendar' '--with-curl' '--with-dom' '--with-dom-xslt' '--with-dom-exslt' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-iconv' '--with-imap=/usr/local/imap-2004g' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-mcrypt' '--enable-magic-quotes' '--with-mysqli' '--with-mysql=/usr' '--with-openssl' '--enable-discard-path' '--with-pear' '--enable-xslt' '--with-xslt-sablot' '--enable-sockets' '--enable-track-vars' '--with-ttf' '--with-freetype-dir=/usr' '--enable-gd-native-ttf' '--with-xmlrpc' '--with-zip' '--with-zlib' - I removed the quotes from the configure command, removed --with-apxs and added --with-xsl, then went to /home/cpapachebuild/buildapache/php-5.2.0 and ran it -
./configure --prefix=/usr/local --with-xml --enable-bcmath --enable-calendar --with-curl --with-dom --with-dom-xslt --with-dom-exslt --enable-ftp --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr --with-xpm-dir=/usr/X11R6 --with-iconv --with-imap=/usr/local/imap-2004g --enable-mbstring --enable-mbstr-enc-trans --enable-mbregex --with-mcrypt --enable-magic-quotes --with-mysqli --with-mysql=/usr --with-openssl --enable-discard-path --with-pear --enable-xslt --with-xslt-sablot --enable-sockets --enable-track-vars --with-ttf --with-freetype-dir=/usr --enable-gd-native-ttf --with-xmlrpc --with-zip --with-zlib --with-xsl - Then executed the following
make
make install
http restart
I know I am missing something basic, but I just can't seem to find it, and I've been searching for hours! Any help would be greatly appreciated.
-
11-30-2006, 01:33 AM #2Web Hosting Master
- Join Date
- Apr 2002
- Location
- Auckland - New Zealand
- Posts
- 1,575
You need the following, as per http://us2.php.net/manual/en/ref.xsl.php
--with-xsl[=DIR]
So, check you have the required development libraries (assuming centos/redhat)
# yum install libxslt-devel
and compile php with
--with-xsl=/usr
-
11-30-2006, 08:09 AM #3New Member
- Join Date
- Mar 2006
- Posts
- 4
Thanks for your reply Dotable Steve!
(quote=Dotable Steve)You need the following, as per http colon slash slash us2.php.net/manual/en/ref.xsl.phpAgreed, I definitely need --with-xsl....
--with-xsl[=DIR](/quote)(QUOTE=Dotable Steve)# yum install libxslt-devel(/quote)Hmmm, this doesn't sound right. From the way I had read the article, php5 includes xsl, it just needs to be "configured" to get it going... It sounds to me like you shouldn't need to install anything outside of php5...(quote=Dotable Steve)and compile php withThis is the part of the process that I needed to be explained further....
--with-xsl=/usr(/quote)
In the meanwhile, I have found a solution for this. I'll put it here for any cPanel users who need this (and for my own future reference!)- Edit /home/cpapachebuild/buildapache/buildscript
- There are about a dozen lines that start with ./configure and have all of the php options as listed in my original post. add --with-xsl to the end of all of them.
- Execute this -
sh /home/cpapachebuild/buildapache/buildscript
-
05-01-2007, 06:56 PM #4New Member
- Join Date
- May 2007
- Posts
- 1
More simple path to make this:
CUSTOM_PHP_FLAGS="--with-xsl" /scripts/easyapache
Advanced users can use
FULL_CUSTOM_PHP_FLAGS="'--with-xsl' '--with-apxs=/usr/local/apache/bin/apxs' '--prefix=/usr/local' '--with-xml' '--enable-bcmath' '--enable-calendar' '--with-curl' '--with-dom' '--with-dom-xslt' '--with-dom-exslt' '--enable-exif' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-gettext' '--with-iconv' '--with-imap=/usr/local/imap-2004g' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-mcrypt' '--enable-memory-limit' '--with-mhash' '--enable-magic-quotes' '--with-mysqli' '--with-mysql=/usr' '--with-openssl' '--enable-discard-path' '--with-pear' '--with-pgsql=/usr' '--enable-sockets' '--enable-track-vars' '--with-ttf' '--with-freetype-dir=/usr' '--enable-gd-native-ttf' '--enable-wddx' '--with-xmlrpc' '--with-zlib'" /scripts/easyapache
-
05-14-2007, 01:05 AM #5Aspiring Evangelist
- Join Date
- Jan 2002
- Posts
- 362
Can somebody confirm for me the operation of "CUSTOM_PHP_FLAGS" and "FULL_CUSTOM_PHP_FLAGS" within the cPanel environment?
Am I correct in assuming that if I specify --with-xsl via CUSTOM_PHP_FLAGS, will this simply add that flag to anything I choose in easyapache, where FULL_CUSTOM_PHP_FLAGS will override ALL php flags chosen in easyapache?
-
05-14-2007, 02:05 PM #6
Truth be told, it's simpler just to create a bash script to update apache, then download php (from the official site), recompile it with the options YOU want and then go from there.
Tom Whiting, WHMCS Guru extraordinaire
Linux problems? WHMCS Problems? Give me a shout
Check out my WHMCS Addons
-
05-16-2007, 01:06 AM #7Junior Guru Wannabe
- Join Date
- Aug 2006
- Location
- India
- Posts
- 86
-
05-16-2007, 03:07 AM #8Aspiring Evangelist
- Join Date
- Jan 2002
- Posts
- 362