Fatal error: Class 'XSLTProcessor' not found

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • phpbilder
    New Member
    • Apr 2008
    • 3

    Fatal error: Class 'XSLTProcessor' not found

    dear friends,

    i am using visual studio php from jcx software (version 5.2.5) and apache from apache friends.com (version 1.6.6a),

    now i am trying to transform a xml document to a xsl file, i create a xsltporcessor class for processing, and when i try to run, i will get a fatal error

    "Fatal error: Class 'XSLTProcessor' not found", i also checked my phpinfo(), xsl is enabled on,

    XSL --------- enabled
    libxslt Version --------- 1.1.17
    libxslt compiled against libxml Version --------- 2.6.26
    EXSLT --------- enabled
    libexslt Version ------- 0.8.13

    these are the information i found in phpinfo();

    but it not run correctly, i searched a lot for more than two days, and changed many dlls and insert many dlls, nothing happend,

    if any know, how to included the xsltprocessor class, kindly reply me, i need it urgently

    waiting for ur reply

    with thanks and regards,
    ramanathan.ct
  • Markus
    Recognized Expert Expert
    • Jun 2007
    • 6092

    #2
    Hey there!
    Unfortunately we are not able to help you if we can't see the code you're using.
    Is the class you are using one you have created yourself?

    Please post ALL RELEVANT code - and post it in the correct code tags.

    Regards.

    Comment

    • Atli
      Recognized Expert Expert
      • Nov 2006
      • 5062

      #3
      Hi. Welcome!

      Is the class you are using created by a 3rd party? That is; they are not a part of the original PHP installation? If so, you may simply need to include the files in which they are defined.

      You could also check out the XSLT Functions at php.net.

      If none of this is helping, please post your code so we can try to help debug it.

      Comment

      • phpbilder
        New Member
        • Apr 2008
        • 3

        #4
        Originally posted by Atli
        Hi. Welcome!

        Is the class you are using created by a 3rd party? That is; they are not a part of the original PHP installation? If so, you may simply need to include the files in which they are defined.

        You could also check out the XSLT Functions at php.net.

        If none of this is helping, please post your code so we can try to help debug it.

        hello thanks for ur quick reply, below is my code
        [code=php]
        $xslt = new XSLTProcessor() ; // the error comes in that line

        $xml = new domDocument();
        $xml -> load('descripti on.xml');


        $xsl = new domDocument();
        $xsl -> load('aod.xsl') ;


        $xslt -> importStyleshee t($xsl);

        echo $xslt -> transformToXml( $xml);
        [/code]

        i also searched a lot but nothing is helpful for me, please help if u know

        thanks and regards
        ram
        Last edited by Atli; Apr 5 '08, 07:52 PM. Reason: Added [code] tags.

        Comment

        • phpbilder
          New Member
          • Apr 2008
          • 3

          #5
          Originally posted by markusn00b
          Hey there!
          Unfortunately we are not able to help you if we can't see the code you're using.
          Is the class you are using one you have created yourself?

          Please post ALL RELEVANT code - and post it in the correct code tags.

          Regards.

          hello thanks for ur quick reply,

          the xsltprocessor() class is not created by me, below is my code

          [code=php]
          $xslt = new XSLTProcessor() ; // the error comes in that line

          $xml = new domDocument();
          $xml -> load('descripti on.xml');


          $xsl = new domDocument();
          $xsl -> load('aod.xsl') ;


          $xslt -> importStyleshee t($xsl);

          echo $xslt -> transformToXml( $xml);
          [/code]


          i also searched a lot but nothing is helpful for me, please help if u know

          thanks and regards
          ram
          Last edited by Atli; Apr 5 '08, 07:52 PM. Reason: Added [code] tags.

          Comment

          • Atli
            Recognized Expert Expert
            • Nov 2006
            • 5062

            #6
            This isn't making much sense.

            If your phpinfo() is telling you that XLS is in fact enabled, the XSLTProcessor class should be loaded...

            Was the phpinfo() function called from a file in the same directory as the file that is failing to load the XLS classes?

            It is possible that PHP is loading different php.ini configurations for each directory, so you should make sure that the configuration for that directory is in fact loading the XSL library.

            Which version of PHP are you using?
            Is it possible that the XSL library you are loading is an outdated version?
            How exactly did you install the library?

            Try using the extension_loade d() function to see if the library is in fact loaded...
            Like, adding this to the top of your code:
            [code=php]
            if(extension_lo aded("xsl")) {
            if(class_exists ("XSLTProcessor ")) {
            trigger_error(" XSL loaded and ready", E_USER_NOTICE);
            }
            else {
            trigger_error(" XSL extension loaded but class could not be found", E_USER_ERROR);
            }
            }
            else {
            trigger_error(" XSL extension has not been loaded", E_USER_ERROR);
            }
            [/code]
            That should give you a clearer picture of what is actually going on.

            Comment

            Working...