Bug #17791 Updated: Apache child dies calling xslt_process

From: Date: Tue, 02 Jul 2002 21:37:03 +0000
Subject: Bug #17791 Updated: Apache child dies calling xslt_process
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-12883@lists.php.net to get a copy of this message
ID: 17791 Updated by: msopacua@idg.nl Reported By: ochoto@diariolinux.com Status: Open Bug Type: XSLT related Operating System: Linux and Windows PHP Version: 4.2.1 New Comment: Actually - this is a user error, but it shouldn't segfault. The arguments should be filenames, not strings. The fault is likely to be in the Sablotron source, since it doesn't count on filenames longer than 512(?) bytes. You can reproduce the error with sabcmd, like so: ./sabcmd xxxxxxxxx y where xxxxxxxx should be 512 or more. Gingerall has been notified. Previous Comments: ------------------------------------------------------------------------ [2002-06-16 17:02:24] ochoto@diariolinux.com 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&#65533;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 this bug report at http://bugs.php.net/?id=17791&edit=1

« previous php.bugs (#12883) next »