Bug #17791: Apache child dies calling xslt_process
| From: | ochoto at diariolinux dot com | Date: | Sun, 16 Jun 2002 21:02:25 +0000 |
| Subject: | Bug #17791: Apache child dies calling xslt_process | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-10798@lists.php.net to get a copy of this message | ||
From: ochoto@diariolinux.com
Operating system: Linux and Windows
PHP version: 4.2.1
PHP Bug Type: XSLT related
Bug description: Apache child dies calling xslt_process
System:
Gentoo Linux 2.4.19
Apache 1.3.24
PHP 4.2.1
expat 1.95.2
sablotron 0.90
libwww 5.3.2 (libxmltok,libxmlparse)
PHP configure options:
'./configure' '--prefix=/usr' '--with-gd' '--with-gmp'
'--with-bz2'
'--with-ttf' '--enable-ftp' '--with-t1lib' '--enable-dbase'
'--with-zlib=yes' '--enable-bcmath' '--enable-sysvsem'
'--enable-sysvshm'
'--enable-calendar' '--enable-trans-sid' '--enable-safe-mode'
'--enable-versioning' '--enable-track-vars' '--with-png-dir=/usr'
'--with-jpeg-dir=/usr/lib' '--enable-inline-optimization'
'--with-apxs=/usr/sbin/apxs -ltiff' '--with-exec-dir=/usr/lib/apache/bin'
'--with-config-file-path=/etc/php4' '--host=i686-pc-linux-gnu'
'--without-readline' '--with-pam' '--with-openssl'
'--with-gdbm=/usr'
'--with-db3=/usr' '--with-mysql=/usr' '--with-unixODBC=/usr'
'--with-ldap'
'--with-pdflib=/usr' '--with-xml' '--with-sablot=/usr'
'--enable-xslt'
'--with-xslt-sablot' '--with-dom' '--with-mcrypt'
'--with-mhash'
'--with-xpm-dir=/usr/X11R6'
Apache error log:
[Sun Jun 16 22:39:55 2002] [notice] child pid 14976 exit signal
Segmentation fault (11)
The same xml and xsl running through sabcmd works ok.
Related:
http://archive.gingerall.cz/archives/public/sablot2002/msg00252.html
http://archive.gingerall.cz/archives/public/sablot2002/msg00254.html
Backtrace:
-----------
(gdb) continue
Continuing.
Program received signal SIGSEGV, Segmentation fault.
0x40720bd9 in Situation::generateMessage () from /usr/lib/libsablot.so.0
(gdb) bt
#0 0x40720bd9 in Situation::generateMessage () from
/usr/lib/libsablot.so.0
#1 0x0a3e656c in ?? ()
Cannot access memory at address 0x7469742f
(gdb)
PHP Code:
<h1>Noticias</h1>
<?php
$xmlFile = "news.xml";
$xslFile = "pcnews.xsl";
// Crear un nuevo identificador de XSLT
$th = xslt_create() or die("Error al crear el identificador de XSLT!");
xslt_set_log($th,'/tmp/xslt.log');
// Abrir los ficheros XML y XSL
$xh = fopen($xmlFile, "r") or die("No se pudo abrir el fichero XML");
$sh = fopen($xslFile, "r") or die("No se pudo abrir el fichero XSL");
// Leer los contenidos de los ficheros XML y XSL
$xmlContent = fread($xh, filesize($xmlFile));
$xslContent = fread($sh, filesize($xslFile));
// Realizar la transformaci�n XSL
$XSLtransformation = xslt_process($th, $xslContent, $xmlContent) or
xslt_error($th);
// Enviar la cabecera WAP correspondiente si es necesario
if ($xslFile == "wapnews") {
header("content-type: text/vnd.wap.wml");
}
// Enviar el fichero XML transformado
echo $XSLtransformation;
// Liberamos los recursos
xslt_free($th);
?>
--
Edit bug report at http://bugs.php.net/?id=17791&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=17791&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=17791&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=17791&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=17791&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=17791&r=support
Expected behavior: http://bugs.php.net/fix.php?id=17791&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=17791&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=17791&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=17791&r=globals