Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    me'
    me' is offline
    Senior Coder
    Join Date
    Nov 2002
    Location
    Warwickshire, England
    Posts
    1,229
    Thanks
    0
    Thanked 0 Times in 0 Posts

    _Still_ having Sablotron install problem

    I've followed all the steps at all the sources I could find (most from notes on the php manual entry for xslt functions), and I still get 'Call to undefined function' error messages when trying to run Sablotron functions.

    I have:
    • Installed expat.dll, sablot.dll to my dlls/ directory
    • Installed expat.dll, sablot.dll and iconv.dll (and all the others in dlls/ for good luck) to c:\windows\system32
    • Uncommented the line in sapi/php_cli.ini that links to the sablotron extension
    I've also ran Dependancy Walker on all the dlls i could find, and all of them seem to already be in system32.

    Anyone had problems like this?
    David House - Perfect is achieved, not when there is nothing left to add, but when there is nothing left to take away. (Antoine de St. Exupery).
    W3Schools | XHTML Validator | CSS Validator | Colours | Typography | HTML&CSS FAQ | Go get Mozilla Now | I blog!

  • #2
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,058
    Thanks
    10
    Thanked 96 Times in 94 Posts
    Hi, which extensions are you trying to run ? there are no sablatron extensions as such , though the XSLT & other extensions do require sablatron to run.

    .. also unless you are working with PHP via the command line or say PHP-GTK etc then the php.ini you should be utilising should be in C:/[windows|winnt]/php.ini , if you do not have one there and you run php as a apache module then php will just be running on its default settings.

    So get a php.ini there (a php.ini in /sapi will also work but not if named php_cli.ini)
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #3
    me'
    me' is offline
    Senior Coder
    Join Date
    Nov 2002
    Location
    Warwickshire, England
    Posts
    1,229
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Okay, I renamed my php_cli.ini file to php.ini (I actually made a copy and renamed it — would this make a difference?), and copied it over to C:\windows\ just in case. Still get error messages when calling xslt_create();.

    Just to let you know: I'm running php through phpdev. I posted in the phpdev forums about this, but those forums seem to be not too active, and no replies as of yet.

    This is my code, by the way:
    PHP Code:
    $xh xslt_create();
    $result xslt_process($xh"rss-feed.xml""rss-parser.xsl");
    echo 
    $result;
    xslt_free($xh); 
    Seems simple enough...

    TIA.
    David House - Perfect is achieved, not when there is nothing left to add, but when there is nothing left to take away. (Antoine de St. Exupery).
    W3Schools | XHTML Validator | CSS Validator | Colours | Typography | HTML&CSS FAQ | Go get Mozilla Now | I blog!

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    On Windows, PHP will be expecting the XML files to be in your PHP directory - C:/PHP or whatever - whereas on unix it will look in same folder as the PHP file it's processing.

    I don't know if that's your problem, because you haven't specifically said what the error is, but that's the gotcha that tripped me up with Sablotron on Windows Apache.

    What you have to do is set a base. I use a conditional statement, because my local dev server is Windows while my public web server is unix:
    Code:
    //create an XSLT processor
    $xsltHandle = xslt_create();
    
    //set the base folder for remote server (unix)
    xslt_set_base($xsltHandle, "");
    
    //set different base for local dev (windows)
    if($_SERVER["SERVER_NAME"]=="192.168.0.1"){
    	xslt_set_base($xsltHandle, "file://c:/Cake/Internet/WebPages/");
    	}
    
    //perform the transformation
    $code = xslt_process($xsltHandle, 'template.xml', 'template.xsl');
    
    //destroy the XSLT processor
    xslt_free($xsltHandle);
    
    //output the resulting code
    echo $code;
    Last edited by brothercake; 12-28-2003 at 11:36 PM.
    "Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark


  •  

    Posting Permissions

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