Re: Error with com_load function in php4
| From: | Philip Lees | Date: | Mon, 10 Jul 2000 09:37:08 +0000 |
| Subject: | Re: Error with com_load function in php4 | ||
| References: | 1 2 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-985@lists.php.net to get a copy of this message | ||
"Howard Cohodas" <Howard.Cohodas@dkt.com> wrote in message
news:NEBBIJGNLKKBOLLDACMKCEBMCKAA.Howard.Cohodas@dkt.com...
> The php4 syntax seems to be different. The only place I've found any
> reference to this is the COM Example at Zend. Here is a snippet that I am
> working on.
>
> $id = new com("otf_GIF31.GIF_Encode");
> print "Loaded otf_GIF Version {$id->Version}";
>
> Note the "->" for ".".
>
> I am using the ISAPI version with WebSite Pro 2.x. After restarting the
> server, my script will run. Subsequent running fails.
Funnily enough, $ver = $myCom.Version; works for me, but $ver =
$myCom->Version; gives an error.
Thanks to your help, I now have the COM call working from the command line,
but I have two problems:
1. When I call the script from a browser, php hangs (this is WinNT 4) - I
have to close the process down from the Task Manager. I have the same
problem when I call an external executable with exec() or backticks, as I
have posted in another thread.
2. The COM function modifies one of its arguments and I need this value to
be returned. This doesn't happen, because (of course) the argument is passed
by value as default. When I prefix it with & to force it to be passed by
reference, I get a syntax error message.
Does anyone have any ideas about the above?
All help appreciated.
Phil