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