php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #8266 Getting fatal error with xlst_process()
Submitted: 2000-12-14 20:45 UTC Modified: 2001-03-17 01:17 UTC
From: heathm at effinitylabs dot com Assigned: sterling (profile)
Status: Closed Package: Documentation problem
PHP Version: 4.0 Latest CVS (14/12/2000) OS: RedHat Linux 6.2
Private report: No CVE-ID: None
 [2000-12-14 20:45 UTC] heathm at effinitylabs dot com
We've been having a lot of problems with this so please allow me to list in detail what we've done so we can try and track down this bugger.

We did a virgin install of RedHat 6.2 with bare bones.

We downloaded the Sablotron 0.44 binaries and copied the libs to /usr/local/lib and added /usr/local/lib to the /etc/ld.so.conf file and ran /sbin/ldconfig.  We then copied the contents of the include dir to /usr/local/include.

We downloaded the Apache 1.3.14 sources and did the typical ./configure in the apache dir after untaring them.

We downloaded PHP 4.0.4RC6 (figured this was close enough to the latest CVS) and untared it.

We ran ./configure --with-apache=../apache_1.3.14 --with-sablot --with-zlib --enable-track-vars

We ran make.  No problems.  We ran make install and then compiled Apache using the conventional ./configure --prefix=/www --activate-module=src/modules/php4/libphp4.a in the apache dir.  Ran make and then make install.  We fixed the /www/conf/httpd.conf file to work with php, of course.  And started Apache with no problems up to this point.

We used the following script:

<?php

$xslData = '
<xsl:stylesheet
  version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="article">
    <table border="1" cellpadding="2" cellspacing="1">
        <tr>
            <td width="20%">
              
            </title>
            <td width="80%">
                <h2><xsl:value-of select="title"></h2>
                <h3><xsl:value-of select="author"></h3>
                <br>
                
                <xsl:value-of select="body">
            </td>
        </tr>
    </table>
</xsl:template>

</xsl:stylesheet>';

$xmlData = '
<?xml version="1.0"?>
<article>
    <title>Learning German</title>
    <author>Sterling Hughes</author>
    <body>
      Essential phrases:
      <br>
      <br>
      Komme sie mir sagen, woe die toilette es?<br>
      Eine grande beer bitte!<br>
      Noch einem bitte.<br>
    </body>
</article>';

if (xslt_process($xslData, $xmlData, $result)) // ---- This is line 42 BTW
{
    echo "Here is the brilliant in-depth article on learning";
    echo " German: ";
    echo "<br>\n<br>";
    echo $result;
}
else
{
    echo "There was an error that occurred in the XSL transformation...\n";
    echo "\tError number: " . xslt_errno() . "\n";
    echo "\tError string: " . xslt_error() . "\n";
    exit;
}
?>

If you'll notice it is the exact same script used in the xlst_process() example in the PHP online docs.

With much anticipation after much effort, blood, sweat and tears... we got the following error:

Fatal error: msgtype: error in /www/htdocs/index.php on line 42.

Attempting to execute any other xslt functions results in the same error.

I've tried a hundred different things and well I'm sick of compiling and compiling and compiling and am frankly out of ideas.  Can anyone fix this or tell me what I've done wrong?  Thanks.

Mike

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-01 17:44 UTC] sterling@php.net
This is a manual bug.  It will be fixed.

Try this with valid XSL and XML and you should get the appropriate results.
 [2001-03-17 01:17 UTC] jmcastagnetto@php.net
Fixed errors in example.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 16:01:27 2024 UTC