From: thomas dot sattler at decon-network dot de Operating system: Windows 2000 PHP version: 4CVS-2003-10-16 (stable) PHP Bug Type: DOM XML related Bug description: Crash of php.exe when xpath_eval of a namespace
Description: ------------ When I try to evaluate the namespace of an xpath node php crashes with a segmentation fault. Reproduce code: --------------- <?php $s = '<?xml version="1.0" ?>'; $s .= '<test:foo xmlns:test="http://www.umweltdatenkatalog.de/udk">'; $s .= '<test:bar>abc'; $s .= '</test:bar>'; $s .= '</test:foo>'; $doc = domxml_open_mem($s); $ctx_p = xpath_new_context($doc); $namesp = xpath_eval($ctx_p, '//namespace::*'); echo '<pre><br/>'; print_r($doc); print_r($ctx_p); print_r($namesp); echo '</pre>'; ?> Expected result: ---------------- The expected result is an Xpath-Object with the name "xmlns:namespace-prefix" and the value "namespace-uri". In the example that would be: name=xmlns:test value=http://www.umweltdatenkatalog.de/udk Actual result: -------------- The php-interpreter causes an programm error and is closed. -- Edit bug report at http://bugs.php.net/?id=25888&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25888&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25888&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=25888&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=25888&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=25888&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=25888&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=25888&r=support Expected behavior: http://bugs.php.net/fix.php?id=25888&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=25888&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=25888&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=25888&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25888&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=25888&r=dst IIS Stability: http://bugs.php.net/fix.php?id=25888&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=25888&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=25888&r=float