bonekrusher Posted September 7, 2008 Share Posted September 7, 2008 Hi, running PHP 5.22- how do I install the XSL extension? I read these directions,, but I dont understand. http://www.php.net/manual/en/xsl.installation.php What file to I add this to (php.ini)? Quote Link to comment Share on other sites More sharing options...
Mchl Posted September 7, 2008 Share Posted September 7, 2008 What OS are you running? Quote Link to comment Share on other sites More sharing options...
bonekrusher Posted September 7, 2008 Author Share Posted September 7, 2008 Windows XP sp2 Quote Link to comment Share on other sites More sharing options...
Mchl Posted September 7, 2008 Share Posted September 7, 2008 Then you probably just need to find ;extension=php_xsl.dll in your php.ini file, and change it to extension=php_xsl.dll Quote Link to comment Share on other sites More sharing options...
bonekrusher Posted September 7, 2008 Author Share Posted September 7, 2008 Thanks.. I have done this and still get an error: Fatal error: Call to undefined function xslt_create() ??? Fustrating Quote Link to comment Share on other sites More sharing options...
Mchl Posted September 7, 2008 Share Posted September 7, 2008 forgot to add: ... and restart Apache Quote Link to comment Share on other sites More sharing options...
bonekrusher Posted September 7, 2008 Author Share Posted September 7, 2008 Still nothing: my phpinfo() says: XSL enabled libxslt Version 1.1.17 libxslt compiled against libxml Version 2.6.26 EXSLT enabled libexslt Version 0.8.13 so it looks installed... Quote Link to comment Share on other sites More sharing options...
Mchl Posted September 7, 2008 Share Posted September 7, 2008 xslt_create() is part of XSLT extension not XSL http://www.php.net/manual/en/book.xslt.php Quote Link to comment Share on other sites More sharing options...
bonekrusher Posted September 7, 2008 Author Share Posted September 7, 2008 thanks - I read the link. I copied my php -.dll files to the windows system dir. I get the same error: Fatal error: Call to undefined function xslt_create() Here is my code: function xml2html($xmldata, $xsl) { /* $xmldata -> your XML */ /* $xsl -> XSLT file */ $path = 'include'; $arguments = array('/_xml' => $xmldata); $xsltproc = xslt_create(); xslt_set_encoding($xsltproc, 'ISO-8859-1'); $html = xslt_process($xsltproc, 'arg:/_xml', "$path/$xsl", NULL, $arguments); if (empty($html)) { die('XSLT processing error: '. xslt_error($xsltproc)); } xslt_free($xsltproc); return $html; } Thanks for the help. Quote Link to comment Share on other sites More sharing options...
Mchl Posted September 7, 2008 Share Posted September 7, 2008 Do you have xslt showing in phpinfo() Quote Link to comment Share on other sites More sharing options...
bonekrusher Posted September 7, 2008 Author Share Posted September 7, 2008 no i dont see it Quote Link to comment Share on other sites More sharing options...
Mchl Posted September 7, 2008 Share Posted September 7, 2008 So you haven't got it installed. See second note on this page: http://www.php.net/manual/en/intro.xslt.php It says XSLT extension isn't bundled with PHP by default, but you have to download it from PECL. Quote Link to comment Share on other sites More sharing options...
bonekrusher Posted September 7, 2008 Author Share Posted September 7, 2008 Thanks.. It doesnt look like the extension is available, but I was able to use the built in xsl processor. Thanks for your help! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.