From: [EMAIL PROTECTED]
Operating system: Linux 2.4.16
PHP version: 4.1.0
PHP Bug Type: *XML functions
Bug description: xpath_new_context fails to create context object
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" \
"$@"
--
Edit bug report at: http://bugs.php.net/?id=14469&edit=1
--
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]