#38206 [Bgs]: DOMXML bnot available when running from command line

From: Date: Tue, 25 Jul 2006 10:40:48 +0000
Subject: #38206 [Bgs]: DOMXML bnot available when running from command line
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-99856@lists.php.net to get a copy of this message
ID: 38206 User updated by: tommi dot korhonen at iki dot fi Reported By: tommi dot korhonen at iki dot fi Status: Bogus Bug Type: DOM XML related Operating System: Windows XP PHP Version: 4.4.2 New Comment: Damn, you're right! I presumed both CLI and non-CLI would use the same php.ini but obviously not. Thanks so much! Case closed. Previous Comments: ------------------------------------------------------------------------ [2006-07-25 10:28:32] tony2001@php.net 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. ------------------------------------------------------------------------ [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

« previous php.bugs (#99856) next »