View Full Version : 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 (http://www.php.net/manual/en/ref.xslt.php)), 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 extensionI've also ran Dependancy Walker (http://www.dependencywalker.com/) on all the dlls i could find, and all of them seem to already be in system32.
Anyone had problems like this?
12-26-2003, 05:40 AM
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)
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 (http://www.firepages.com.au/FUD/index.php?t=msg&th=1031&start=0&rid=1229&S=ed6294b211ff04eca742ed16a26cd0ef&SQ=a9cd1d14e016173805accc3069fa4284) about this, but those forums seem to be not too active, and no replies as of yet.
This is my code, by the way:
$xh = xslt_create();
$result = xslt_process($xh, "rss-feed.xml", "rss-parser.xsl");
xslt_free($xh);Seems simple enough...
12-29-2003, 12:33 AM
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:
//create an XSLT processor
$xsltHandle = xslt_create();
//set the base folder for remote server (unix)
//set different base for local dev (windows)
//perform the transformation
$code = xslt_process($xsltHandle, 'template.xml', 'template.xsl');
//destroy the XSLT processor
//output the resulting code
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.