|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-12-12 20:01 UTC] mfischer@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 09:00:01 2025 UTC |
The xpath_new_context function is failing to create a new context object for the XPath functions. The following code snippet works fine in php 4.0.6 xmlfile: <?xml version="1.0" encoding="ISO-8859-1"?> <partner id="2" type="P" active="1" simple="0" template="0" image_size="0" button_type="B"> <timestamp>1008124281</timestamp> <name>MagazineOutlet.com</name> <bounty_cut>0.000000e+0</bounty_cut> <domain_name></domain_name> </partner> phpfile (where the above XML file is referenced below as '2.xml'): <?php $xpathString = "/partner/name"; $filename = XML_FILEPATH."partner/2.xml"; $xmlDoc = xmldocfile($filename); $xpathContextObj = xpath_new_context($xmlDoc); var_dump($xpathContextObj); ?> The above delivers this in PHP 4.0.6: object(XPathContext)(1) { ["xpathctx"]=> resource(2) of type (xpath context) } and this in PHP 4.1.0: bool(false) Here are the compile settings for PHP and Apache (compiled directly into Apache): PHP ./configure --with-apache=../apache_1.3.22 --enable-track-vars --with-xml --with-dom --with-ibm-db2=/usr/IBMdb2/V6.1 --with-zlib --enable-xslt --with-xslt-sablot --enable-sablot-errors-descriptive --enable-inline-optimization --with-config-file-path=/opt/gr/oas/lib/ --enable-sysvshm --with-curl=/usr/local --without-mysql --with-pgsql=/usr --enable-trans-sid --with-expat-dir=/usr Apache ./configure \ "--with-layout=Apache" \ "--prefix=/opt/gr/oas/apache/" \ "--disable-rule=EXPAT" \ "--enable-module=rewrite" \ "--enable-module=ssl" \ "--activate-module=src/modules/php4/libphp4.a" \ "--enable-module=php4" \ "--enable-module=expires" \ "--disable-module=include" \ "$@"