471,071 Members | 1,532 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,071 software developers and data experts.

Php5 - xsl extension not working

I can tell I'm not alone in my confusion, as I've been using Google to
find a solution to this problem and all I can find is the same question,
but no solution.

I am running Php 5.25 (Windows binary from php.net) as an Apache 2.0.55
module on Windows XP.

I have enabled the xsl extension - php_xsl.dll - in php.ini and indeed,
when I look at phpinfo I see all the needed libraries (i.e., DOM/XML,
libXML, XSL, libxslt) are enabled.

Yet, if I try to call xslt_create(), I get:
"Fatal error: Call to undefined function xslt_create() in ....."

Any idea what I need to do to get this working?

Detail from phpinfo:
-------------------------
dom
DOM/XML enabled
DOM/XML API Version 20031129
libxml Version 2.6.26
HTML Support enabled
XPath Support enabled
XPointer Support enabled
Schema Support enabled
RelaxNG Support enabled

libxml
libXML support active
libXML Version 2.6.26
libXML streams enabled

xml
XML Support active
XML Namespace Support active
libxml2 Version 2.6.26

xsl
XSL enabled
libxslt Version 1.1.17
libxslt compiled against libxml Version 2.6.26
EXSLT enabled
libexslt Version 0.8.13
-------------------------

--
*****************************
Chuck Anderson • Boulder, CO
http://www.CycleTourist.com
Nothing he's got he really needs
Twenty first century schizoid man.
***********************************

Jun 2 '08 #1
7 4114
On Mon, 05 May 2008 05:11:51 +0200, Chuck Anderson
<we************@seemy.sigwrote:
I can tell I'm not alone in my confusion, as I've been using Google to
find a solution to this problem and all I can find is the same question,
but no solution.

I am running Php 5.25 (Windows binary from php.net) as an Apache 2.0.55
module on Windows XP.

I have enabled the xsl extension - php_xsl.dll - in php.ini and indeed,
when I look at phpinfo I see all the needed libraries (i.e., DOM/XML,
libXML, XSL, libxslt) are enabled.

Yet, if I try to call xslt_create(), I get:
"Fatal error: Call to undefined function xslt_create() in ....."

Any idea what I need to do to get this working?

Detail from phpinfo:
-------------------------
dom
libxml
xml
xsl
XSL enabled
libxslt Version 1.1.17
libxslt compiled against libxml Version 2.6.26
EXSLT enabled
libexslt Version 0.8.13
And XSLT?

http://nl2.php.net/manual/en/xslt.installation.php
Check out sablot.dll, expat.dll, and iconv.dll.

P.S: for PHP >= 5 I'd recommend XSL instead of XSLT.
--
Rik Wasmus
Jun 2 '08 #2
Chuck Anderson schreef:
I can tell I'm not alone in my confusion, as I've been using Google to
find a solution to this problem and all I can find is the same question,
but no solution.

I am running Php 5.25 (Windows binary from php.net) as an Apache 2.0.55
module on Windows XP.

I have enabled the xsl extension - php_xsl.dll - in php.ini and indeed,
when I look at phpinfo I see all the needed libraries (i.e., DOM/XML,
libXML, XSL, libxslt) are enabled.

Yet, if I try to call xslt_create(), I get:
"Fatal error: Call to undefined function xslt_create() in ....."

Any idea what I need to do to get this working?
By looking at the manual: http://www.php.net/xsl

XSL in PHP5 has been implemented in the XSLTProcessor class...
JW
Jun 2 '08 #3
Janwillem Borleffs wrote:
Chuck Anderson schreef:
>I can tell I'm not alone in my confusion, as I've been using Google to
find a solution to this problem and all I can find is the same question,
but no solution.

I am running Php 5.25 (Windows binary from php.net) as an Apache 2.0.55
module on Windows XP.

I have enabled the xsl extension - php_xsl.dll - in php.ini and indeed,
when I look at phpinfo I see all the needed libraries (i.e., DOM/XML,
libXML, XSL, libxslt) are enabled.

Yet, if I try to call xslt_create(), I get:
"Fatal error: Call to undefined function xslt_create() in ....."

Any idea what I need to do to get this working?


By looking at the manual: http://www.php.net/xsl

XSL in PHP5 has been implemented in the XSLTProcessor class
...
JW
Okay, .... thanks. I had tried a quick test of that previously and it
failed, but I must have misspelled something, as the XSLTProcessor class
does indeed work. Now all I need to do is get my web host to enable
this, as it seems the best way to ensure an xml -xsl transformation is
to do it server side and NOT rely on the browser or JavaScript.

I'm having fun experimenting with this stuff.

--
*****************************
Chuck Anderson • Boulder, CO
http://www.CycleTourist.com
Nothing he's got he really needs
Twenty first century schizoid man.
***********************************

Jun 2 '08 #4
Rik Wasmus wrote:
On Mon, 05 May 2008 05:11:51 +0200, Chuck Anderson
<we************@seemy.sigwrote:

>I can tell I'm not alone in my confusion, as I've been using Google to
find a solution to this problem and all I can find is the same question,
but no solution.

I am running Php 5.25 (Windows binary from php.net) as an Apache 2.0.55
module on Windows XP.

I have enabled the xsl extension - php_xsl.dll - in php.ini and indeed,
when I look at phpinfo I see all the needed libraries (i.e., DOM/XML,
libXML, XSL, libxslt) are enabled.

Yet, if I try to call xslt_create(), I get:
"Fatal error: Call to undefined function xslt_create() in ....."

Any idea what I need to do to get this working?

Detail from phpinfo:
-------------------------
dom

>libxml

>xml

>xsl
XSL enabled
libxslt Version 1.1.17
libxslt compiled against libxml Version 2.6.26
EXSLT enabled
libexslt Version 0.8.13

And XSLT?

I seem to have it all enabled now I was trying to use the Php4 functions
in Php5.
http://nl2.php.net/manual/en/xslt.installation.php
Check out sablot.dll, expat.dll, and iconv.dll.
Those are for the Php4 implementation, only (as far as I can tell).
P.S: for PHP >= 5 I'd recommend XSL instead of XSLT.
I'm not sure what you mean here, but I would like to understand, as I
think I'm on to a new way of doing things (for me) by converting MySQL
data to XML and using XSL transform to create the HTML output.

How do I "use XSL instead of XSLT" ...? I thought they were basically
the same thing . Can you be more precise .... or point me to something
that explains what you mean.

--
*****************************
Chuck Anderson • Boulder, CO
http://www.CycleTourist.com
Nothing he's got he really needs
Twenty first century schizoid man.
***********************************

Jun 2 '08 #5
On Tue, 06 May 2008 08:00:02 +0200, Chuck Anderson
<we************@seemy.sigwrote:
Rik Wasmus wrote:
>On Mon, 05 May 2008 05:11:51 +0200, Chuck Anderson
<we************@seemy.sigwrote:

>>I can tell I'm not alone in my confusion, as I've been using Google
to find a solution to this problem and all I can find is the same
question, but no solution.

I am running Php 5.25 (Windows binary from php.net) as an Apache
2.0.55 module on Windows XP.

I have enabled the xsl extension - php_xsl.dll - in php.ini and
indeed, when I look at phpinfo I see all the needed libraries (i.e.,
DOM/XML, libXML, XSL, libxslt) are enabled.

Yet, if I try to call xslt_create(), I get:
"Fatal error: Call to undefined function xslt_create() in ....."

Any idea what I need to do to get this working?

Detail from phpinfo:
-------------------------
dom

>>libxml

>>xml

>>xsl
XSL enabled
libxslt Version 1.1.17
libxslt compiled against libxml Version 2.6.26
EXSLT enabled
libexslt Version 0.8.13

And XSLT?


I seem to have it all enabled now I was trying to use the Php4 functions
in Php5.
>http://nl2.php.net/manual/en/xslt.installation.php
Check out sablot.dll, expat.dll, and iconv.dll.

Those are for the Php4 implementation, only (as far as I can tell).
>P.S: for PHP >= 5 I'd recommend XSL instead of XSLT.

I'm not sure what you mean here,
Instead of using these: http://nl2.php.net/manual/en/ref.xslt.php
Use these: http://nl2.php.net/manual/en/class.xsltprocessor.php
but I would like to understand, as I think I'm on to a new way of doing
things (for me) by converting MySQL data to XML and using XSL transform
to create the HTML output.
Be very sure you _need_ that. IMHO, XML is usefull for storage (which you
could not need because you allready have a database for storage, but
perhaps some caching be usefull), or communication/data sharing between
scripts, which you also don't mention.

In most projects, I'd say the conversion database -XML -HTML would be
an unnecessary step, and database -HTML is just a lot less overhead.
--
Rik Wasmus
Jun 2 '08 #6
Rik Wasmus wrote:
On Tue, 06 May 2008 08:00:02 +0200, Chuck Anderson
<we************@seemy.sigwrote:

>Rik Wasmus wrote:
>>On Mon, 05 May 2008 05:11:51 +0200, Chuck Anderson
<we************@seemy.sigwrote:

I can tell I'm not alone in my confusion, as I've been using Google
to find a solution to this problem and all I can find is the same
question, but no solution.

I am running Php 5.25 (Windows binary from php.net) as an Apache
2.0.55 module on Windows XP.

I have enabled the xsl extension - php_xsl.dll - in php.ini and
indeed, when I look at phpinfo I see all the needed libraries (i.e.,
DOM/XML, libXML, XSL, libxslt) are enabled.

Yet, if I try to call xslt_create(), I get:
"Fatal error: Call to undefined function xslt_create() in ....."

Any idea what I need to do to get this working?

Detail from phpinfo:
-------------------------
dom

libxml

xml

xsl
XSL enabled
libxslt Version 1.1.17
libxslt compiled against libxml Version 2.6.26
EXSLT enabled
libexslt Version 0.8.13
And XSLT?
I seem to have it all enabled now I was trying to use the Php4 functions
in Php5.

>>http://nl2.php.net/manual/en/xslt.installation.php
Check out sablot.dll, expat.dll, and iconv.dll.

Those are for the Php4 implementation, only (as far as I can tell).

>>P.S: for PHP >= 5 I'd recommend XSL instead of XSLT.

I'm not sure what you mean here,

Instead of using these: http://nl2.php.net/manual/en/ref.xslt.php
Use these: http://nl2.php.net/manual/en/class.xsltprocessor.php

>but I would like to understand, as I think I'm on to a new way of doing
things (for me) by converting MySQL data to XML and using XSL transform
to create the HTML output.

Be very sure you _need_ that. IMHO, XML is usefull for storage (which you
could not need because you allready have a database for storage, but
perhaps some caching be usefull), or communication/data sharing between
scripts, which you also don't mention.

In most projects, I'd say the conversion database -XML -HTML would be
an unnecessary step, and database -HTML is just a lot less overhead.
What you say does make sense to me. I have only just now delved into xml
- xsl so I could include it in my resume. And indeed, it seems a pretty
simple tool to use. Where I think it's taking me now, as I explore my
possibilities with it, is to show me how to modularize my Php - html
scripts better (like the xsl templates).

The next thing I think I'll try with xml/xsl is a simple customized CMS
(for instance, one that lets a site owner change a Links page). I think
something like that may be easier than using MySQL. Either way, I want
the experience so I can include it on my resume.

I'm still pondering how to merge Php and xml/xsl. My guess is that I
could use Php to create xsl files on the fly .... or to include them on
the fly. But the more I think about that, the more I think, like you
say, that simply modularizing my Php content templates (to be like like
xsl template files) and getting my content from MySQL will be the most
flexible and efficient.

I appreciate the help and advice.

--
*****************************
Chuck Anderson • Boulder, CO
http://www.CycleTourist.com
Nothing he's got he really needs
Twenty first century schizoid man.
***********************************

Jun 2 '08 #7
Chuck Anderson wrote:
Rik Wasmus wrote:
>On Tue, 06 May 2008 08:00:02 +0200, Chuck Anderson
<we************@seemy.sigwrote:

>>Rik Wasmus wrote:

On Mon, 05 May 2008 05:11:51 +0200, Chuck Anderson
<we************@seemy.sigwrote:

I can tell I'm not alone in my confusion, as I've been using
Google to find a solution to this problem and all I can find is
the same question, but no solution.
>
I am running Php 5.25 (Windows binary from php.net) as an Apache
2.0.55 module on Windows XP.
>
I have enabled the xsl extension - php_xsl.dll - in php.ini and
indeed, when I look at phpinfo I see all the needed libraries
(i.e., DOM/XML, libXML, XSL, libxslt) are enabled.
>
Yet, if I try to call xslt_create(), I get:
"Fatal error: Call to undefined function xslt_create() in ....."
>
Any idea what I need to do to get this working?
>
Detail from phpinfo:
-------------------------
dom
>
>

libxml
>
>

xml
>
>

xsl
XSL enabled
libxslt Version 1.1.17
libxslt compiled against libxml Version 2.6.26
EXSLT enabled
libexslt Version 0.8.13
>
>
And XSLT?

I seem to have it all enabled now I was trying to use the Php4
functions in Php5.
http://nl2.php.net/manual/en/xslt.installation.php
Check out sablot.dll, expat.dll, and iconv.dll.
Those are for the Php4 implementation, only (as far as I can tell).
P.S: for PHP >= 5 I'd recommend XSL instead of XSLT.
I'm not sure what you mean here,

Instead of using these: http://nl2.php.net/manual/en/ref.xslt.php
Use these: http://nl2.php.net/manual/en/class.xsltprocessor.php

>>but I would like to understand, as I think I'm on to a new way of
doing things (for me) by converting MySQL data to XML and using XSL
transform to create the HTML output.

Be very sure you _need_ that. IMHO, XML is usefull for storage (which
you could not need because you allready have a database for storage,
but perhaps some caching be usefull), or communication/data sharing
between scripts, which you also don't mention.

In most projects, I'd say the conversion database -XML -HTML would
be an unnecessary step, and database -HTML is just a lot less
overhead.

What you say does make sense to me. I have only just now delved into xml
- xsl so I could include it in my resume. And indeed, it seems a pretty
simple tool to use. Where I think it's taking me now, as I explore my
possibilities with it, is to show me how to modularize my Php - html
scripts better (like the xsl templates).

The next thing I think I'll try with xml/xsl is a simple customized CMS
(for instance, one that lets a site owner change a Links page). I think
something like that may be easier than using MySQL. Either way, I want
the experience so I can include it on my resume.

I'm still pondering how to merge Php and xml/xsl. My guess is that I
could use Php to create xsl files on the fly .... or to include them on
the fly. But the more I think about that, the more I think, like you
say, that simply modularizing my Php content templates (to be like like
xsl template files) and getting my content from MySQL will be the most
flexible and efficient.

I appreciate the help and advice.
Rik is correct. XML is not intended to be an intermediate step between
the database and HTML. Rather, it is intended as a means for
machine-to-machine transfer of data, i.e. one webserver picking up XML
data from another and displaying it in a specific format.

Using XML as an intermediate step between your database and HTML is an
unnecessary step which adds much more overhead to the server.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Jun 2 '08 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Spidah | last post: by
5 posts views Thread by Tim Tyler | last post: by
11 posts views Thread by neur0maniak | last post: by
4 posts views Thread by badbetty | last post: by
4 posts views Thread by >>-Archer--> | last post: by
19 posts views Thread by McKirahan | last post: by
8 posts views Thread by Tony B | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.