Fatal error: Call to undefined function xslt_create()

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • myshona
    New Member
    • Jan 2008
    • 15

    Fatal error: Call to undefined function xslt_create()

    Hi Everybody,
    I am getting the below error

    Fatal error: Call to undefined function xslt_create()

    In my phpinfo page it shows that xsl is enabled. What might be the problem?.I am using php 5 and apache server 2.2 . Please help me out.


    Regards,
    Raj
  • realin
    Contributor
    • Feb 2007
    • 254

    #2
    i m not very sure but did u read the manual properly. Because it says that you ned some Sablot library

    cheers !!

    Comment

    • myshona
      New Member
      • Jan 2008
      • 15

      #3
      Hi,

      Thanks for the reply. I do have the sablot library. I am not able to figure out where is the problem.


      Thanks,
      RAJ

      Comment

      • fjm
        Contributor
        • May 2007
        • 348

        #4
        Have a look at this Raj, this may help you:

        PHP is a popular general-purpose scripting language that powers everything from your blog to the most popular websites in the world.

        Comment

        • myshona
          New Member
          • Jan 2008
          • 15

          #5
          Originally posted by fjm
          Have a look at this Raj, this may help you:

          http://www.php.net/xslt_create
          I have copied sablot.dll, Expat.dll, iconv.dll to system32 directory and have set the path in environment variables for all these DLL's. Still not working. Please help

          Comment

          • myshona
            New Member
            • Jan 2008
            • 15

            #6
            Need you suggestions. Please help

            Comment

            • myshona
              New Member
              • Jan 2008
              • 15

              #7
              I am still stuck with this. Need your suggestions

              Comment

              • fjm
                Contributor
                • May 2007
                • 348

                #8
                Raj,

                When you install php on windows, you must copy 3 files into the windows\system3 2 directory before using xslt_create()

                These files are in your installed php/dlls directory
                expat.dll
                sablot.dll
                iconv.dll

                Then edit your php.ini file (c:\windowsdir\ php.ini)
                and uncomment the line extension=php_x slt.dll (remove the ; from the beginning)

                Restart php and apache, it should work ;)

                Let me know if that helped.

                EDIT:
                In my windows installation, my PHP dll directory is NOT under windows\system3 2 but rather under C:\Program Files\PHP\ext

                I believe you placed those files in the wrong place.
                Last edited by fjm; Jun 30 '08, 07:12 AM. Reason: Additional Information

                Comment

                • myshona
                  New Member
                  • Jan 2008
                  • 15

                  #9
                  Originally posted by fjm
                  Raj,

                  When you install php on windows, you must copy 3 files into the windows\system3 2 directory before using xslt_create()

                  These files are in your installed php/dlls directory
                  expat.dll
                  sablot.dll
                  iconv.dll

                  Then edit your php.ini file (c:\windowsdir\ php.ini)
                  and uncomment the line extension=php_x slt.dll (remove the ; from the beginning)

                  Restart php and apache, it should work ;)

                  Let me know if that helped.
                  Thanks for the reply. I had done all these and also phpinfo page was showing that xsl is enabled. The way to sort this out in PHP 5 is when you are transforming the file from one format to other format (xml->php) use the below code for the transformation its for php 5

                  $xml = new DomDocument;
                  $xml->load($xmlfilen ame);

                  $xsl = new DomDocument;
                  $xsl->load($xsltfile name);

                  $proc = new xsltprocessor;
                  $proc->importStyleShe et($xsl);
                  $result = $proc->transformToXML ($xml);

                  After changing the code dont forget to comment extension=php_d omxml.dll in the ini file and restart the server. Now it should work.

                  Comment

                  • fjm
                    Contributor
                    • May 2007
                    • 348

                    #10
                    I updated my last post in case you don't get it working. We seemed to have posted at the same time. :)

                    Comment

                    • myshona
                      New Member
                      • Jan 2008
                      • 15

                      #11
                      Originally posted by fjm
                      Raj,

                      EDIT:
                      In my windows installation, my PHP dll directory is NOT under windows\system3 2 but rather under C:\Program Files\PHP\ext

                      I believe you placed those files in the wrong place.
                      Wherever the dll's are either in windows/system32 or in ext folder of php the extension directory in the ini file has to be changed. It works both the ways.

                      Comment

                      Working...