[PHP-DEV] PHP 4.0 Bug #10064: Apache Seg Faults with XSLT and domXML usage
From: [EMAIL PROTECTED] Operating system: Linux Mandrake 8.0 PHP version: 4.0 Latest CVS (29/03/2001) PHP Bug Type: Apache related Bug description: Apache Seg Faults with XSLT and domXML usage The compile script is as follows: ./configure \ --mandir=/usr/share/man \ --with-apxs=/usr/local/apache/bin/apxs \ --with-config-file-path=/etc/httpd \ --enable-magic-quotes \ --enable-bcmath \ --enable-calendar \ --with-dom=/usr/local \ --with-zlib-dir \ --enable-ftp \ --with-mysql=/usr/local/mysql \ --with-pgsql=/usr/local/pgsql \ --with-expat-dir=/usr/local \ --with-sablot=/usr/local \ --enable-trans-sid \ --with-regex=system \ --with-swf=/usr/local/openswf \ --enable-wddx \ --enable-memory-limit \ --with-gnu-ld The system is: Linux Mandrake 8.0 Apache 1.3.19 glibc 2.2.2 MySQL 3.23.34a Postgres 7.0.3 libxml 2.3.4 Sablot 0.51 expat 1.95.1 gdb backtrace: Program received signal SIGSEGV, Segmentation fault. 0x403d0742 in Processor::useArg (this=0x8145840, name=0x8f8 Address 0x8f8 out of bounds, val=0x0) at proc.cpp:1067 1067proc.cpp: No such file or directory. in proc.cpp Current language: auto; currently c++ (gdb) bt #0 0x403d0742 in Processor::useArg (this=0x8145840, name=0x8f8 Address 0x8f8 out of bounds, val=0x0) at proc.cpp:1067 #1 0x403d12a4 in SablotRunProcessor (processor_=0x8145840, sheetURI=0x81358bc "test.xsl", inputURI=0x4032ebfc "arg:/_xmlinput", resultURI=0x4032ebef "arg:/_output", params=0x0, arguments=0xbfffdad0) at sablot.cpp:137 #2 0x40279d7e in php_if_xslt_output_endtransform (ht=0, return_value=0x8136254, this_ptr=0x0, return_value_used=0) at sablot.c:317 #3 0x4021c3c1 in execute (op_array=0x811d774) at ./zend_execute.c:1494 #4 0x4022d27d in zend_execute_scripts (type=8, file_count=3) at zend.c:743 #5 0x40244f5c in php_execute_script (primary_file=0xb690) at main.c:1194 #6 0x402406a5 in apache_php_module_main (r=0x812ad04, display_source_mode=0) at sapi_apache.c:89 #7 0x4024137c in send_php (r=0x812ad04, display_source_mode=0, filename=0x812b7e4 "/home/www/public_html/xsl/test2.php") at mod_php4.c:521 #8 0x402413c2 in send_parsed_php (r=0x812ad04) at mod_php4.c:532 #9 0x0805b797 in ap_invoke_handler () #10 0x0807029b in process_request_internal () #11 0x08070310 in ap_process_request () #12 0x080673b2 in child_main () #13 0x08067564 in make_child () #14 0x080676d8 in startup_children () #15 0x08067d57 in standalone_main () #16 0x0806858f in main () #17 0x400960de in __libc_start_main () from /lib/libc.so.6 (gdb) Code that is killing it: ?php xslt_output_begintransform("test.xsl"); $doc = new_xmldoc("1.0"); //books $books = $doc-add_root("books"); //book $book = $books-new_child("book",""); // title $title = $book-new_child("title","Core Java Programming"); // authors $authors = $book-new_child("authors",""); //author $author = $authors-new_child("author","Leon Atkinson2"); $author-set_attribute("id","1"); // isbn $isbn = $book-new_child("isbn",123); // isbn id="123" $isbn-set_attribute("id","987"); /* ## */ //book $book = $books-new_child("book",""); // title $title = $book-new_child("title","Flash 4 Magic"); // authors $authors = $book-new_child("authors",""); //author $author = $authors-new_child("author","David Emberton"); $author-set_attribute("id","1"); $author = $authors-new_child("author","J. Scott Hamlin"); $author-set_attribute("id","2"); // isbn $isbn = $book-new_child("isbn",123); // isbn id="123" $isbn-set_attribute("id","987"); echo $doc-dumpmem(); xslt_output_endtransform(); ? -- Edit Bug report at: http://bugs.php.net/?id=10064edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Bug #11440: PHP Seg faults with xslt_output_begintransform(xsl_file);
' xsl:with-param name='form_type' select='string(text)' / xsl:with-param name='form_name' select='string(micahs_form)' / xsl:with-param name='form_value' select='form2' / /xsl:call-template /xsl:text br /br / pMicah Says Another One/p xsl:text xsl:call-template name='test_form' xsl:with-param name='form_type' select='string(text)' / xsl:with-param name='form_name' select='string(micahs_form2)' / xsl:with-param name='form_value' select='form2' / /xsl:call-template /xsl:text /td /tr /table /xsl:template /xsl:stylesheet ## form.xsl ## ?xml version=1.0? xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform; version=1.0 xsl:template name='test_form' xsl:param name='form_name' / xsl:param name='form_type' / xsl:param name='form_value' / xsl:value-of select='concat(#60;input type=,$form_type, name=,$form_name, size=15 value=#39;,$form_value,#39; /)' disable-output-escaping='yes' / /xsl:template /xsl:stylesheet Discussion The only xslt_xxx function that is useable to transform xsl with Sablotron is the xslt_process which only takes the information as strings. Ntoe: Everything works fine with this. However, you can use xsl:include with a string for xslt_process, so I need to send the string with xslt_output_begintransform() in order for all includes to happen. I need to use that function, because I will not know what all xsl files will need to be included with every parsing; template designers add and change things all the time; plus it would be nice if the transformation was as close to standards as possible. Note: This seg fault problem has been a problem from php 4.0.3+; I have also tried the CVS copies and xslt does not seem to work in that distribution at all (compile with --with-sablot-xslt; according to configure --help). I can take these same three files (converting the php file to straight XML) and use sabcmd -L log -m index.xsl index.xml index.html and it is transformed without a hitch. This is definitely an issue with PHP. I have also created the XML file with the PHP DOM functions and echoing the tree out (as per the manual example) in between xslt_output_begintransform() and xslt_output_endtransform() and it seg faults as well. Any questions let me know. Micah -- Edit Bug report at: http://bugs.php.net/?id=11440edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Bug #12571: Apache segfaults(11)
From: [EMAIL PROTECTED] Operating system: Linux Debian woody PHP version: 4.0.6 PHP Bug Type: Apache related Bug description: Apache segfaults(11) I've got php-4.0.6 compiled with apache 1.3.20 (config options below), running horde 1.3.4, IMP 2.3.7, Turba 0.0.2. I'm doing a full upgrade from an older version of all of these. The old setup works fine for user Amy, and everyone else, this new install seems to work for every account that I've tried *except* Amy's. When I login, apache segfaults (11). Normally I would think that this might be because of mysql or imap (running pine4.33's newest IMAP), but it works fine for all the other users. I can reproduce the error every time I login as Amy, but not when I login as myself. Here is my configure for php: ./configure \ --with-zlib --with-mm --with-mysql=/usr \ --with-mcal=../libmcal-0.6.orig \ --with-config-file-path=/usr/local/lib \ --with-imap=/usr/local/src/pine4.33/imap \ --with-gettext --enable-ftp --with-gdbm \ --with-apache=../apache_1.3.20 --with-mcrypt --disable-magic-quotes Here is my configure for apache: ./configure --enable-module=mime_magic --enable-module=unique_id --enable-module=rewrite --enable-module=setenvif --enable-module=speling --enable-module=expires --enable-module=info --enable-module=log_agent --enable-module=log_referer --enable-module=so --enable-suexec --suexec-caller=www-data --suexec-docroot=/usr/var/www --activate module=src/modules/php4/libphp4.a Horde/IMP folks say that it is a php problem. gdb backtrace: gdb ./httpd -f conf/httpd.conf GNU gdb 19990928 Copyright 1998 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type show copying to see the conditions. There is absolutely no warranty for GDB. Type show warranty for details. This GDB was configured as i686-pc-linux-gnu... /usr/local/apache/bin/conf/httpd.conf: No such file or directory. (gdb) run -X Starting program: /usr/local/apache/bin/./httpd -X Program received signal SIGSEGV, Segmentation fault. 0x2775e0 in realloc () from /lib/libc.so.6 (gdb) bt #0 0x2775e0 in realloc () from /lib/libc.so.6 #1 0x81d8f36 in fs_resize (block=0x85674b8, size=2048) at fs_unix.c:46 #2 0x81e8e61 in imap_sort (stream=0x84b8fb0, charset=0x0, spg=0x852cd70, pgm=0x8515a60, flags=1) at imap4r1.c:1667 #3 0x81d0003 in mail_sort (stream=0x84b8fb0, charset=0x0, spg=0x852cd70, pgm=0x8515a60, flags=1) at mail.c:3501 #4 0x80b1e9f in php_if_imap_sort (ht=5, return_value=0x852cd54, this_ptr=0x0, return_value_used=1) at php_imap.c:2773 #5 0x817e25a in execute (op_array=0x83a14ac) at ./zend_execute.c:1504 #6 0x8144874 in zend_execute_scripts (type=8, file_count=3) at zend.c:752 #7 0x809757f in php_execute_script (primary_file=0xb318) at main.c:1206 #8 0x81555fc in apache_php_module_main (r=0x8346af4, display_source_mode=0) at sapi_apache.c:89 #9 0x80941f2 in send_php () #10 0x809422a in send_parsed_php () #11 0x8188c99 in ap_invoke_handler () #12 0x819d5ff in process_request_internal () #13 0x819d666 in ap_process_request () #14 0x8194586 in child_main () #15 0x8194741 in make_child () #16 0x81948bc in startup_children () #17 0x8194f2c in standalone_main () #18 0x819575c in main () #19 0x2232db in __libc_start_main () from /lib/libc.so.6 (gdb) -- Edit bug report at: http://bugs.php.net/?id=12571edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]