SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Addict
    Join Date
    Nov 2005
    Location
    Moss, Norway.
    Posts
    283
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question PHP XSLTProcessor problem in Sitepoint XML Book.

    Book: No Nonsense XML Web Development With PHP

    April 2006 edition.

    I get an error with the XML sitemap in chapter 5.

    Here is the actual page.

    I have contacted my hoser and asked them to install the XSLTProcessor as explained in the book on page 132 (April 2006 version).

    "XSLT support in PHP is provided by the optional XSL extension : http://www.php.net/xsl

    This extension isn't enabled by default: So you'll need to compile it in using

    --with-xsl

    on Unix style installations. You'll need to install libxslt:

    http://xmlsoft.org/XSLT/

    on your server before you can do this.

    On, Windows the process is a bit easier: You simply need to add the php_xsl.dll file to your php.ini file on Windows."


    Answer from hoster,

    I have now installed: /usr/ports/textproc/p5-XML-LibXSLT

    Even with this line

    php_value include_path ".:/usr/local/lib/php:/usr/ports/textproc/p5-XML-LibXSLT"

    in .htaccess

    I get the same error.

    Line 35 look like this:

    $proc = new XSLTProcessor;

    so it is obvious that the XSLT processor is not found.

    Anybody that has experienced the same problem and know the solution? Thanks in advance.

    P.S. I changed common.inc.php to:

    <?php
    session_start();

    //$fileDir = $_SERVER['DOCUMENT_ROOT'] . '/xml/'; Original version.
    $fileDir = $_SERVER['DOCUMENT_ROOT'] . '/Books/XML/05advxslt/cms/xml/';
    ?>

    Also posted as a post in another thread in the XML sub forum.

  2. #2
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Sounds like your host installed libxslt, but did not recompile PHP to use the XSL extension.
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  3. #3
    SitePoint Addict
    Join Date
    Nov 2005
    Location
    Moss, Norway.
    Posts
    283
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the answer. Shall contact them.

    That solved the problem.
    Last edited by kgun; Jul 11, 2007 at 09:10.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •