Page 1 of 1

Uncaught exception 'com_exception' with message

Posted: Mon Mar 07, 2005 3:36 am
by anjanesh
Server : Windows 2003 IIS6.0 with PHP 5.0.3 support.
This is working on my PC but on the server it gives an error msg.

Code: Select all

<?php
// ini_set("com.allow_dcom","true");
$word = new COM("word.application") or die("Unable to instanciate Word");
echo "Loaded Word, version &#123;$word->Version&#125;\n";
?>
Fatal error: Uncaught exception 'com_exception' with message 'Failed to create COM object `word.application': Invalid syntax ' in xxx\test.php:3 Stack trace: #0 xxx\test.php(3): com->com('word.applicatio...') #1 {main} thrown in xxx\test.php on line 3

Any idea on how to resolve this ?
Thanks

Posted: Mon Mar 07, 2005 12:30 pm
by anjanesh
BTW, is it possible that this error is being generated because of MS Office (MS Word in this case) not being installed.
Wanted to know if it requires MS Word to be installed or just some dll ?
Just for reference : Windows 2003 hosting details : http://webstrikesolutions.com/windows.html

Posted: Mon Mar 07, 2005 2:27 pm
by smpdawg
You would need Word installed to do COM automation.

Posted: Mon Mar 07, 2005 5:01 pm
by feyd
Why would it not require Word being installed? Word's install creates the com component links..