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)? Link to comment https://forums.phpfreaks.com/topic/123126-xsl-extension/ Share on other sites More sharing options...
Mchl Posted September 7, 2008 Share Posted September 7, 2008 What OS are you running? Link to comment https://forums.phpfreaks.com/topic/123126-xsl-extension/#findComment-635859 Share on other sites More sharing options...
bonekrusher Posted September 7, 2008 Author Share Posted September 7, 2008 Windows XP sp2 Link to comment https://forums.phpfreaks.com/topic/123126-xsl-extension/#findComment-635860 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 Link to comment https://forums.phpfreaks.com/topic/123126-xsl-extension/#findComment-635864 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 Link to comment https://forums.phpfreaks.com/topic/123126-xsl-extension/#findComment-635870 Share on other sites More sharing options...
Mchl Posted September 7, 2008 Share Posted September 7, 2008 forgot to add: ... and restart Apache Link to comment https://forums.phpfreaks.com/topic/123126-xsl-extension/#findComment-635872 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... Link to comment https://forums.phpfreaks.com/topic/123126-xsl-extension/#findComment-635874 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 Link to comment https://forums.phpfreaks.com/topic/123126-xsl-extension/#findComment-635881 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. Link to comment https://forums.phpfreaks.com/topic/123126-xsl-extension/#findComment-635898 Share on other sites More sharing options...
Mchl Posted September 7, 2008 Share Posted September 7, 2008 Do you have xslt showing in phpinfo() Link to comment https://forums.phpfreaks.com/topic/123126-xsl-extension/#findComment-635905 Share on other sites More sharing options...
bonekrusher Posted September 7, 2008 Author Share Posted September 7, 2008 no i dont see it Link to comment https://forums.phpfreaks.com/topic/123126-xsl-extension/#findComment-635968 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. Link to comment https://forums.phpfreaks.com/topic/123126-xsl-extension/#findComment-635976 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! Link to comment https://forums.phpfreaks.com/topic/123126-xsl-extension/#findComment-636079 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.