Forums » Saxon/C Help and Discussions »
Managed to install... but not working...
Added by Carlos Romero about 11 years ago
After searching and re-searching I managed to install Saxon/C on Centos32
!https://dl.dropboxusercontent.com/u/27183845/saxon/Screenshot%202013-12-19%2013.01.03.png!
However, I am getting a Fatal Error since no methods are available...
!https://dl.dropboxusercontent.com/u/27183845/saxon/Screenshot%202013-12-19%2013.04.08.png!
Here is my code:
$xslt = new XsltProcessor();
print_r( $xslt->version());
# echo $xslt->xsltApplyStylesheet("cat.xml", "test.xsl");
Any ideas?
Replies (2)
RE: Managed to install... but not working... - Added by O'Neil Delpratt about 11 years ago
I think the failure is with @XsltProcessor@ Please check if @$xslt@ is null.
if($xslt==null){ ... }
I am also wondering if the php extension is finding the Saxon/C library or the JET libraries. Please see: http://www.saxonica.com/saxon-c/index.xml#installingLin
Example of setting 'LD_LIBRARY_PATH' from within the PHP (for testing):
$saved = getenv("LD_LIBRARY_PATH"); // save old value $newld = "/usr/local/jet8.0-eval-x86/profile1.6.0_43/jre/lib/i386/jetvm:/usr/local/jet8.0-eval-x86/lib/x86/shared"; // extra paths to add if ($saved) { $newld .= ":$saved"; } // append old paths if any putenv("LD_LIBRARY_PATH=$newld"); // set new value // mycommand is loaded using // libs in the new path list putenv("LD_LIBRARY_PATH=$saved"); $saved = getenv("PATH"); // save old value $newld = "/usr/local/jet8.0-eval-x86/bin:/usr/local/jet8.0-eval-x86/profile1.6.0_43/jre"; // extra paths to add if ($saved) { $newld .= ":$saved"; } // append old paths if any putenv("PATH=$newld"); // set new value
RE: Managed to install... but not working... - Added by O'Neil Delpratt almost 11 years ago
A better way to set LD_LIBRARY_PATH in apache do the following:
For ubuntu server, in /etc/apache2/envvars, for centos server, in /etc/sysconfig/httpd, add:
export LD_LIBRARY_PATH=/usr/lib/rt/lib/i386/jetvm
and restart apache
Please register to reply