Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_php thread: php and xslt


Message #1 by "Nikolai Devereaux" <nikolai@u...> on Mon, 31 Dec 2001 18:17:29 -0800
I recently set up yaf win2k web server with php, mysql, and apache.  I've
never really had problems before, but I've been struggling for two days to
get code that's worked on many other machines running both windows and linux
to work here.

The code uses xslt_process().

All existing code that I have works on 4.0.6 installations by calling the
function with these params:

xslt_process(string $xsl, string $xml, string $output);


After a lot of frustration, it seems that the docs were rewritten behind my
back!  The function now takes the xslt processor resource as the first
param, and reverses the order of xsl and xml text params!

xslt_process(resource $xh, string $xml, string $xsl);


Okay, so I've had to rewrite code to work with the newer version of PHP.
phpinfo() tells me that xslt support is enabled.  I have sablot.dll,
php_sablot.dll, php_iconv.dll, xmltok.dll, etc.. all in their correct
places.

So whenever I try to perform a transformation I either get an unknown
encoding error (which I thought php_iconv.dll was supposed to handle), or I
get an internal server error.


After messing with this for a while, I poked around the php site for the
4.1.0 change log.  Check this out:

"Removed the sablotron extension in favor of the new XSLT extension.
(Sterling)"

So what the hell is going on?  Why does sablotron come with PHP 4.1.0, when
it's apparently not used, and where is the documentation for what it's been
replaced with?

A search on google for "sablotron unknown encoding error" comes up with tons
of hits for php/sablotron problems and bugs, most of which are either not
replied to, or solved by putting "libiconv.dll" in %windows%\system32.
However, libiconv.dll does NOT come with either PHP or Sablotron.
Sablotron's latest version comes with iconv.dll, but I don't think it's the
same thing.


If ANYONE has any insight to this, or if you've gotten PHP 4.1.0 to work
with xslt transformations, please let me know.  I'm about to delete my php
dir and install an earlier version to see if that will work.... but not
tonight.

Champagne calls!

Happy new year, everyone!

Nik


  Return to Index