RE: [PHP-DEV] Bug #14381: xlst_error causes error with valid XSLT processor instance

2001-12-07 Thread Robinson, Mike
Title: RE: [PHP-DEV] Bug #14381: xlst_error causes error with valid  XSLT processor instance





The manual seems to be wrong for xslt.
The arguments are in the reverse order it appears.


 Mike Robinson
 IT / Developer - Toronto Star TV
 Phone: 416.945.8786
 Fax: 416.869.4566
 Email: [EMAIL PROTECTED]



> -Original Message-
> From: Hans Rakers [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 07, 2001 1:06 PM
> To: Alexander Wagner; Rasmus Lerdorf
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP-DEV] Bug #14381: xlst_error causes error with valid
> XSLT processor instance
> 
> 
> At 18:54 7-12-2001 +0100, Alexander Wagner wrote:
> >Am Freitag 07 Dezember 2001 18:33 schrieb Rasmus Lerdorf:
> > > > AFAIK (and according to the manual) the first argument 
> to xslt_process()
> > > > should be a string containing the XSL data ($xslData) 
> and not the XSLT
> > > > processor handle. Please advise.
> > >
> > > Then the manual is wrong.  The code is clearly expecting 
> arguments in this
> > > order:
> >
> >ext/sablot or ext/xslt ?
> >The manual seems to be right for old ext/sablot.
> >
> >Are you two talking about the same extension?
> >
> >regards
> >Wagner
> 
> 
> I'm using --enable-xslt --with-xslt-sablot (the new 4.1.0 
> ext/xslt extension)
> 
> 
> -- 
> Hans Rakers ([EMAIL PROTECTED])    Tel: +31 (0)23 5325689
> System engineer / Webmaster / Webdeveloper Fax: +31 (0)23 5324957
> Parse - TeKoop http://www.parse.nl
> Haarlem, the Netherlands   http://www.tekoop.nl
> 
> 
> -- 
> 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]
> 




http://www.torontostartv.com - Webcasting & Production
http://www.tmgtv.ca - Hometown Television
http://www.thestar.com - Canada’s largest daily newspaper, The Toronto Star, online



-- 
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]


Re: [PHP-DEV] Bug #14381: xlst_error causes error with valid XSLT processor instance

2001-12-07 Thread Hans Rakers

At 18:54 7-12-2001 +0100, Alexander Wagner wrote:
>Am Freitag 07 Dezember 2001 18:33 schrieb Rasmus Lerdorf:
> > > AFAIK (and according to the manual) the first argument to xslt_process()
> > > should be a string containing the XSL data ($xslData) and not the XSLT
> > > processor handle. Please advise.
> >
> > Then the manual is wrong.  The code is clearly expecting arguments in this
> > order:
>
>ext/sablot or ext/xslt ?
>The manual seems to be right for old ext/sablot.
>
>Are you two talking about the same extension?
>
>regards
>Wagner


I'm using --enable-xslt --with-xslt-sablot (the new 4.1.0 ext/xslt extension)


-- 
Hans Rakers ([EMAIL PROTECTED])Tel: +31 (0)23 5325689
System engineer / Webmaster / Webdeveloper Fax: +31 (0)23 5324957
Parse - TeKoop http://www.parse.nl
Haarlem, the Netherlands   http://www.tekoop.nl


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Bug #14381: xlst_error causes error with valid XSLT processor instance

2001-12-07 Thread Alexander Wagner

Am Freitag 07 Dezember 2001 18:33 schrieb Rasmus Lerdorf:
> > AFAIK (and according to the manual) the first argument to xslt_process()
> > should be a string containing the XSL data ($xslData) and not the XSLT
> > processor handle. Please advise.
>
> Then the manual is wrong.  The code is clearly expecting arguments in this
> order:

ext/sablot or ext/xslt ?
The manual seems to be right for old ext/sablot.

Are you two talking about the same extension?

regards
Wagner

-- 
"He's dead Jim" "No I'm not! I'm feeling much bet-" ZZZAP!

-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Bug #14381: xlst_error causes error with valid XSLT processor instance

2001-12-07 Thread Hans Rakers

At 09:33 7-12-2001 -0800, Rasmus Lerdorf wrote:
> > At 09:10 7-12-2001 -0800, Rasmus Lerdorf wrote:
> > > > the following code causes Apache processes to segfault:
> > > >
> > > > $xsl_handle = xslt_create();
> > > > echo $xsl_handle; // returns a valid xslt processor handle
> > > > // $xslData and $xmlData contain valid information
> > > > xslt_process($xslData, $xmlData, $result);
> > > > echo xslt_error($xsl_handle);
> > > > xslt_free($xsl_handle);
> > > >
> > > > This piece of code also returns a "Warning: Supplied argument is not a
> > > > valid XSLT Processor resource in *** on line 27", where line 27 is
> > > > "xslt_process($xslData, $xmlData, $result);
> > > > "
> > >
> > >It obviously shouldn't crash, but the first argument to xslt_process()
> > >needs to be $xsl_handle in your case.  The warning you are seeing is
> > >correct.
> > >
> > >-Rasmus
> >
> >
> > AFAIK (and according to the manual) the first argument to xslt_process()
> > should be a string containing the XSL data ($xslData) and not the XSLT
> > processor handle. Please advise.
>
>Then the manual is wrong.  The code is clearly expecting arguments in this
>order:
>
>resource processor,
>string xml,
>string xsl
>
>-Rasmus


I adapted the php source to read "xslt_process($xsl_handle, $xmlData, 
$xslData);", and this results in another (weird) segfault. Backtrace follows:

Program received signal SIGSEGV, Segmentation fault.
0x40081963 in Situation::generateMessage (this=0x6f660909, type=1932358766,
 code=543521385, arg1=@0x7039203a, arg2=@0xa203b74, theMessage=@0x6f660909)
 at situa.cpp:263
263 if (messenger && !(flags & SAB_NO_ERROR_REPORTING))
Current language:  auto; currently c++
(gdb) bt
#0  0x40081963 in Situation::generateMessage (this=0x6f660909,
 type=1932358766, code=543521385, arg1=@0x7039203a, arg2=@0xa203b74,
 theMessage=@0x6f660909) at situa.cpp:263
#1  0xa203b30 in ?? () at eval.c:88
Cannot access memory at address 0x30303030



-- 
Hans Rakers ([EMAIL PROTECTED])Tel: +31 (0)23 5325689
System engineer / Webmaster / Webdeveloper Fax: +31 (0)23 5324957
Parse - TeKoop http://www.parse.nl
Haarlem, the Netherlands   http://www.tekoop.nl


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Bug #14381: xlst_error causes error with valid XSLT processor instance

2001-12-07 Thread Hans Rakers

At 09:10 7-12-2001 -0800, Rasmus Lerdorf wrote:
> > the following code causes Apache processes to segfault:
> >
> > $xsl_handle = xslt_create();
> > echo $xsl_handle; // returns a valid xslt processor handle
> > // $xslData and $xmlData contain valid information
> > xslt_process($xslData, $xmlData, $result);
> > echo xslt_error($xsl_handle);
> > xslt_free($xsl_handle);
> >
> > This piece of code also returns a "Warning: Supplied argument is not a
> > valid XSLT Processor resource in *** on line 27", where line 27 is
> > "xslt_process($xslData, $xmlData, $result);
> > "
>
>It obviously shouldn't crash, but the first argument to xslt_process()
>needs to be $xsl_handle in your case.  The warning you are seeing is
>correct.
>
>-Rasmus


AFAIK (and according to the manual) the first argument to xslt_process() 
should be a string containing the XSL data ($xslData) and not the XSLT 
processor handle. Please advise.


-- 
Hans Rakers ([EMAIL PROTECTED])Tel: +31 (0)23 5325689
System engineer / Webmaster / Webdeveloper Fax: +31 (0)23 5324957
Parse - TeKoop http://www.parse.nl
Haarlem, the Netherlands   http://www.tekoop.nl


-- 
PHP Development Mailing List 
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 #14381: xlst_error causes error with valid XSLT processor instance

2001-12-07 Thread hans

From: [EMAIL PROTECTED]
Operating system: Linux-2.4.14 glibc-2.2.3
PHP version:  4.1.0
PHP Bug Type: Reproducible crash
Bug description:  xlst_error causes error with valid XSLT processor instance


the following code causes Apache processes to segfault:

$xsl_handle = xslt_create();
echo $xsl_handle; // returns a valid xslt processor handle
// $xslData and $xmlData contain valid information
xslt_process($xslData, $xmlData, $result);
echo xslt_error($xsl_handle);
xslt_free($xsl_handle);

This piece of code also returns a "Warning: Supplied argument is not a
valid XSLT Processor resource in *** on line 27", where line 27 is
"xslt_process($xslData, $xmlData, $result);
"

Backtrace:

Program received signal SIGSEGV, Segmentation fault.
0x404b251b in strlen (str=0x0) at ../sysdeps/i386/strlen.c:27
27  ../sysdeps/i386/strlen.c: No such file or directory.
(gdb) bt
#0  0x404b251b in strlen (str=0x0) at ../sysdeps/i386/strlen.c:27
#1  0x8114a6d in zif_xslt_error (ht=1, return_value=0x8367dfc,
this_ptr=0x0,
return_value_used=1) at sablot.c:584
#2  0x8155e2a in execute (op_array=0x835694c) at ./zend_execute.c:1590
#3  0x8131419 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
at zend.c:814
#4  0x8073ae1 in php_execute_script (primary_file=0xb358) at
main.c:1309
#5  0x813cc6c in apache_php_module_main (r=0x8337ba8,
display_source_mode=0)
at sapi_apache.c:90
#6  0x80700e6 in send_php () at eval.c:88
#7  0x8070142 in send_parsed_php () at eval.c:88
#8  0x81a4819 in ap_invoke_handler () at eval.c:88
#9  0x81b9b6f in process_request_internal () at eval.c:88
#10 0x81b9fd6 in ap_internal_redirect () at eval.c:88
#11 0x8196a2d in mod_gzip_redir1_handler () at eval.c:88
#12 0x81952c2 in mod_gzip_handler () at eval.c:88
#13 0x81a4819 in ap_invoke_handler () at eval.c:88
#14 0x81b9b6f in process_request_internal () at eval.c:88
#15 0x81b9bd6 in ap_process_request () at eval.c:88
#16 0x81b09f6 in child_main () at eval.c:88
#17 0x81b0bd5 in make_child () at eval.c:88
#18 0x81b0d4c in startup_children () at eval.c:88
#19 0x81b13dd in standalone_main () at eval.c:88
#20 0x81b1c5c in main () at eval.c:88
#21 0x4045a2eb in __libc_start_main (main=0x81b18a8 , argc=2,
ubp_av=0xbb34, init=0x806cdec <_init>, fini=0x81d83ac <_fini>,
rtld_fini=0x4000c130 <_dl_fini>, stack_end=0xbb2c)
at ../sysdeps/generic/libc-start.c:129

Specs:

Slackware-8.0 glibc-2.2.3 (Linux osiris 2.4.14 #1 Thu Nov 8 15:02:47 CET
2001 i686 unknown)
apache_1.3.22
php-4.1.0RC5
expat-1.95.2
Sablot-0.71

PHP config:

./configure \
--with-apache=../apache_1.3.22 \
--with-mysql=/usr/local/mysql \
--with-gd=/usr/local \
--with-freetype-dir=/usr/local \
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
--with-zlib \
--with-openssl \
--with-curl \
--enable-xslt \
--with-xslt-sablot \
--enable-sysvsem \
--enable-sysvshm \
--enable-track-vars \
--enable-memory-limit \
--enable-debug=yes

Apache config:

EAPI_MM=../mm-1.1.3 \
SSL_BASE=/usr \
./configure \
--with-layout=Apache \
--prefix=/usr/local/apache \
--enable-module=rewrite \
--enable-module=ssl \
--add-module=/root/downloads/mod_gzip.c \
--activate-module=src/modules/php4/libphp4.a


-- 
Edit bug report at: http://bugs.php.net/?id=14381&edit=1


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]