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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: chregu at phant dot ch
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Wed May 07 17:01:30 2025 UTC