Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Class "XSLTProcessor' not found [duplicate]

Tags:

php

xml

xls

I'm trying to transform a XML file to a HTML output with XSLT..

My code is as following:

<?php

$xml = new DOMDocument;
$xml->load('file.xml');

$xsl = new DOMDocument;
$xsl->load('file.xsl');

$proc = new XSLTProcessor;

$proc->importStyleSheet($xsl);

echo $proc->transformToXML($xml);

?> 

But I'm getting the error: Fatal error: Class 'XSLTProcessor' not found

I know this has something to do with the fact dat the xsltprocessor is not compiled with PHP on my server... But I can't seem to find a way to enable it. (I do not control the server, but my hosting does)

like image 855
Ronald Wildschut Avatar asked Jan 27 '12 18:01

Ronald Wildschut


Video Answer


1 Answers

Just install : sudo apt-get install php5-xsl

AND RESTART your APACHE Server ;)

like image 150
Amazi Avatar answered Sep 29 '22 15:09

Amazi