php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22561 cannot initialize xslt_create()
Submitted: 2003-03-05 17:33 UTC Modified: 2003-03-05 19:48 UTC
From: fabpicca at inwind dot it Assigned:
Status: Not a bug Package: XSLT related
PHP Version: 4.3.1 OS: Windows Me
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: fabpicca at inwind dot it
New email:
PHP Version: OS:

 

 [2003-03-05 17:33 UTC] fabpicca at inwind dot it
the script is very easy taken from the shared documentation

<?php

// Allocate a new XSLT processor
// $xh=xslt_create();

// Process the document
if (xslt_process($xh, 'rubrica.xml', 'trasformatore.xsl', 'result.xml')) {
    print "SUCCESS, sample.xml was transformed by sample.xsl into result.xml";
    print ", result.xml has the following contents\n<br>\n";
    print "<pre>\n";
    readfile('result.xml');
    print "</pre>\n";
}
else {
    print "Sorry, sample.xml could not be transformed by sample.xsl into";
    print "  result.xml the reason is that " . xslt_error($xh) . " and the ";
    print "error code is " . xslt_errno($xh);
}

xslt_free($xh);

?>



the output is


Fatal error: Call to undefined function: xslt_process() in C:\apache\htdocs\webpages\html2xml\converter.php on line 11


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-03-05 19:48 UTC] nicos@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

Read the doc:
http://www.php.net/manual/en/ref.xslt.php
 [2003-05-02 02:25 UTC] pax at atensis dot se
I'm suffering from the same problem using:
Win2000 (build 5.00.2195 SP2)
PHP 4.3.1
Apache2

My PHP script stops executing when hitting the row containing 'xslt_create()', without saying a word... See code below.
I have no problem using the xml parser (expat.dll) and I've moved the contents of the c:\php\dlls folder to my c:\winnt\system32 folder that is in my system PATH, so it should have anything to do with not finding the 'sablot.dll'. Everything besides the XSLT operations seems to work alright for my system.

<code>
<?php

  // Create an XSLT processor
  print "This line will get printed...";
  $xsltHandle = xslt_create();
  print "This line WILL NOT get printed...";

  // Perform the transformation
  $html = xslt_process($xsltHandle, 'test.xml', 'test.xsl');


  // Detect errors
  if (!$html) die('XSLT processing error: '.xslt_error($xsltHandle));


  // Destroy the XSLT processor
  xslt_free($xsltHandle);


  // Output the resulting HTML
  echo $html;

?>
</code>
 [2003-05-02 03:39 UTC] pax at atensis dot se
Ooops! missed this one.
WIN32 users - Try to uncomment the row in PHP.INI under the "Windows Extensions" section that says "extension=php_xslt.dll".

Restart your server and try again. Worked for me.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Sep 19 16:01:24 2020 UTC