php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14494 xpath_new_context nolonger works
Submitted: 2001-12-13 16:31 UTC Modified: 2001-12-13 16:38 UTC
From: peter at jingo dot com Assigned:
Status: Closed Package: DOM XML related
PHP Version: 4.1.0 OS: Linux Red Hat 7.1
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: peter at jingo dot com
New email:
PHP Version: OS:

 

 [2001-12-13 16:31 UTC] peter at jingo dot com
xpath_new_context() 
worked fine in 4.0.6 with libxml2-2.3.10

but not with 4.1 with neither 
libxml2-2.4.2 nor libxml2-2.4.12

<?php
$xmlDOM = xmldocfile('index.xml');
$xpath = xpath_new_context ($xmlDOM);
?>

returns:
Warning: Invalid object in test.php on line 13


./configure --with-apxs=/usr/local/apache/bin/apxs --with-db --with-pgsql=/usr/local/pgsql --with-gettext --with-openssl=/usr/local/ssl --enable-dbase  --with-expat-dir=/usr/local/expat --with-dom --with-zlib --enable-xslt --with-xslt-sablot=/usr/local/sablot 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-12-13 16:38 UTC] mfischer@php.net
Syntax has changed, use

  $xpath = $xmlDOM->xpath_new_context();

This is fixed in CVS already.

Closing.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed May 07 11:01:29 2025 UTC