php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12993 xpath_eval doesn't work anymore (segfault)
Submitted: 2001-08-28 04:21 UTC Modified: 2002-06-03 18:19 UTC
From: chregu at phant dot ch Assigned:
Status: Closed Package: DOM XML related
PHP Version: 4.0CVS-2001-08-28 OS: Debian/unstable Linux 2.4.9
Private report: No CVE-ID: None
 [2001-08-28 04:21 UTC] chregu at phant dot ch
actually it does not work in PHP_4_0_7 from cvs as well.

script:
$fd = fopen( $datasrc, "r" );
$xmlstring = fread( $fd, filesize( $datasrc ) );
fclose( $fd );
$xml = xmldoc($xmlstring);
$xpth = $xml->xpath_new_context($xml);
$node = $xpth->xpath_eval("/root/books");

just segfaults at xpath_eval().

libxml2-version is 2.4.3

chregu

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-08-28 04:23 UTC] chregu at phant dot ch
ah forgot to mention:
the script worked in 4.0.6


 [2001-08-28 04:43 UTC] chregu@php.net
mmmh...

maybe it was my fault

$node = xpath_eval($xpth,"/root/books");

seems to work, so i'm not sure if it's a bug anymore

but comparing to the other syntax, should

$node = $xpth->xpath_eval("/root/books");

not also work?




 [2001-11-21 20:11 UTC] mfischer@php.net
Can you try latest RC and see if the problem still exists

http://www.php.net/~zeev/php-4.1.0RC3.tar.gz

Feedback.

 [2001-11-30 08:12 UTC] mfischer@php.net
Update: fix is comming, assigning to me.
 [2001-12-01 14:45 UTC] mfischer@php.net
Should be fixed in CVS. Closing.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 16:01:29 2024 UTC