On Monday, March 18, 2002, at 12:34 PM, Mike Eynon wrote:
> I have got the Sablotron XSLT extension working in Windows, but now am > having trouble getting it to work on my LINUX servers. I just got it up and running in Linux with PHP 4.1.2 the other day. > I have tried reading > http://www.devshed.com/Server_Side/XML/XSLTrans/print > to find the answers (which I got from earlier posts), but it doesn't > seem to > give me what I need. That's just a good tutorial to using XSLT with PHP, not so much an installation guide. > I have downloaded the latest 4.1.2 php from php.net, which is supposed > to > contain the Sablotron stuff. When I configure before the build with the > line: > ./configure' '--with-mysql' '--with-gd' '--with-xslt-sablot' > '--enable-xslt-sablot' '--with-xslt' '--with- > apxs=/usr/local/apache/bin/apxs > > I get no errors. I then make without errors, and finally 'make install' > without errors. > BUT! When I do a phpinfo(), I do not see the xslt extension being > loaded, > and when I make a call to xslt_create(), I get the following error: > Fatal error: Call to undefined function: xslt_create() in > /usr/local/apache/htdocs/help/index.php on line 45 > > When I go and look into the config.status file, I see the following: > checking whether to enable xslt support... no > checking whether to enable the XSLT Sablotron backend... yes > checking libexpat dir for Sablotron XSL support... no > > When I try to just have "--enable-xslt", I get an error in the configure > script: > configure: error: not found. Please re-install the Sablotron > distribution The problem is that you can't just compile PHP with support for Sablotron and XSLT, you need to have Sablotron and the Expat parser libraries installed on your system first. Doing this couldn't be easier: Download latest expat tarball first, then build it (./configure ; make ; make install -- no ./configure options needed unless you really need something special) :: http://www.jclark.com/xml/expat.html Next download latest Sablotron tarball and build that (same thing, a simple ./configure ; make ; make install -- will work fine out of the box) :: http://www.gingerall.com/charlie/ga/xml/p_sab.xml Finally, remove the config.cache files and `make clean` your PHP and Apache source directories, and recompile PHP. Be sure to include the --enable-xslt and --with-xslt-sablot ./configure options. If you have done default installs of expat and Sablotron (I think they automatically install into /usr/local/lib), PHP knows where to find them and will take care of it. Mike, if you want I have a log of the exact commands I used to do this, and can send them to you if you want. Let me know how this works for you -- it'll take you less than a half hour from start to finish to do all this. Erik ---- Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php