ID: 38206
Updated by: [EMAIL PROTECTED]
-Summary: DOMXML not available when running from command line
Reported By: tommi dot korhonen at iki dot fi
-Status: Open
+Status: Bogus
Bug Type: DOM XML related
Operating System: Windows XP
PHP Version: 4.4.2
New Comment:
Obviously you didn't enable the extension, that's why it's not
available.
Check which php.ini is used by CLI and make sure this php.ini has DOM
extension enabled.
Previous Comments:
------------------------------------------------------------------------
[2006-07-25 10:28:11] tommi dot korhonen at iki dot fi
Forgot to say that web server runs on the same machine that CLI-PHP.
------------------------------------------------------------------------
[2006-07-25 10:19:49] tommi dot korhonen at iki dot fi
Description:
------------
When running a script from command line (eg. c:\php\cli\php.exe
domxml.php) the DOMXML functions don't work. I get error message
Fatal error: Call to undefined function: domxml_open_file() in
C:\temp\domxml.php on line 4
All needed dlls should be available, since DOMXML works fine when
running on web server (Apache2, PHP as CGI). DOMXML extension is also
reported available in phpinfo() on web server but not in cli\php.exe -i
Reproduce code:
---------------
<?php
$in = file_get_contents($argv[1]);
// create XML-DOM object from a file
if (!$dom = domxml_open_file($in)) {
exit("Couldn't load infile");
}
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=38206&edit=1