RE: [PHP] runing com

2002-11-14 Thread Michael Hazelden
Apologies all - that should have just gone to the Windows list ...

-Original Message-
From: Michael Hazelden [mailto:michael.hazelden@;ocado.com]
Sent: 14 November 2002 10:18
To: 'kai'; [EMAIL PROTECTED]
Subject: [PHP-WIN] RE: [PHP] runing com


Kai,

I've moved this to the Windows list because someone else here might be able
to add something.

I'm afaid I didn't have to adjust anything within the PHP ini or anything -
for me it worked pretty much "out of the box".

With regards the registry - in order to check that you are using the
appropriate application id - simply open up regedit and search for the name
of the identifier you are using - if it's going to be used as a COM
identifier - it has to be in there somewhere.

Finding out what that identifier is though (if you don't already know it)
... is another matter ... the easiest way (I think) ... is to use
"HKEY_CLASSES_ROOT" in the registry ... browse through that list and look to
see if there is something appropriate.

In your case - for Media Player - I found "Mediaplayer.mediaplayer" in my
Windows 2000 server registry. It might be the one - but I haven't tried that
to see whether it works.

Basically - if you don't have documentation on the functions contained
within a COM object - you are a little shafted ... because it's going to be
very hard to know what functions to access and how.

Luckily - in my case - the application I interface with has full COM
documentation.

Sorry I can't be of more assistance.

Michael.

-Original Message-
From: kai [mailto:kai_flash@;hotmail.com]
Sent: 14 November 2002 19:05
To: [EMAIL PROTECTED]
Subject: Re: [PHP] runing com


Hi Michael,
thanks for your reply.

> Firstly - that error would suggest to me that Word is not installed on
your
> machine.

Thats true thats why i've been trying to start other applications like
wordpad,
just to see some funktionality.

>... try looking it up in the registry to confirm the registration
> for COM exists.

Maybe you can give me a little hint on that.
I've been creating some com components in vb some time ago,
but as I remember I had to register them with regsvr.exe  but that was
for dll's and stuff.

But hey I don't know exactly what you are suggesting, please help.

> Second ... why do you want to run media player to play a wave file on the
> server? I would have thought you'd want to activate the script on the
client

No, what I am trying to do is, if someone I know activates a button on my
site,
a sound file will play on my server, which is locate in my kitchen, to catch
my attention.

Further more I'd like to control outlook for different tasks.

> Another good idea is to check over the event viewer on the server - there
> are sometime some very revealing errors in there.

I've tried that, but did not see any entries related to my problem.

If your com code is running fine,
maybe you can remember if you have some special settings in
your php.ini, appache or win2k settings.

Any suggestion is welcome.

Thank you very much

KAi
"Michael Hazelden" <[EMAIL PROTECTED]> wrote in message
news:C1260EE72F22C44F833D033A17524AD702A4D159@;lhoexc1...
> I've been having some fun with COM myself recently ... so I can suggest a
> couple of things ...
>
> Firstly - that error would suggest to me that Word is not installed on
your
> machine. Remember - in order to interface with an app - it has to be
there.
> If it is ... try looking it up in the registry to confirm the registration
> for COM exists.
>
> Second ... why do you want to run media player to play a wave file on the
> server? I would have thought you'd want to activate the script on the
client
> ...
>
> Another good idea is to check over the event viewer on the server - there
> are sometime some very revealing errors in there.
>
> Cheers,
>
> Michael.
>
> -Original Message-
> From: kai [mailto:kai_flash@;hotmail.com]
> Sent: 14 November 2002 07:20
> To: [EMAIL PROTECTED]
> Subject: [PHP] runing com
>
>
> hi guy's I have a problem running com+ code and would appreciate any help.
>
> What I like to do is have the mediaplayer run a wave file triggert from
php
> via com.
> but I can not run any example code from the help without errors.
>
>
> this code is from a the help and should work but doesn't on my mashine:
>
> // starting word
> $word = new COM("word.application") or die("Unable to instanciate Word");
> print "Loaded Word, version {$word->Version}\n";
>
> file://bring it to front
> $word->Visible = 1;
> file://open an empty document
> $word->Documents->Add();
> file://do some weird stuff
> $word->Selection->TypeText("This is a test..."

Re: [PHP] runing com

2002-11-14 Thread kai
Hi Michael,
thanks for your reply.

> Firstly - that error would suggest to me that Word is not installed on
your
> machine.

Thats true thats why i've been trying to start other applications like
wordpad,
just to see some funktionality.

>... try looking it up in the registry to confirm the registration
> for COM exists.

Maybe you can give me a little hint on that.
I've been creating some com components in vb some time ago,
but as I remember I had to register them with regsvr.exe  but that was
for dll's and stuff.

But hey I don't know exactly what you are suggesting, please help.

> Second ... why do you want to run media player to play a wave file on the
> server? I would have thought you'd want to activate the script on the
client

No, what I am trying to do is, if someone I know activates a button on my
site,
a sound file will play on my server, which is locate in my kitchen, to catch
my attention.

Further more I'd like to control outlook for different tasks.

> Another good idea is to check over the event viewer on the server - there
> are sometime some very revealing errors in there.

I've tried that, but did not see any entries related to my problem.

If your com code is running fine,
maybe you can remember if you have some special settings in
your php.ini, appache or win2k settings.

Any suggestion is welcome.

Thank you very much

KAi
"Michael Hazelden" <[EMAIL PROTECTED]> wrote in message
news:C1260EE72F22C44F833D033A17524AD702A4D159@;lhoexc1...
> I've been having some fun with COM myself recently ... so I can suggest a
> couple of things ...
>
> Firstly - that error would suggest to me that Word is not installed on
your
> machine. Remember - in order to interface with an app - it has to be
there.
> If it is ... try looking it up in the registry to confirm the registration
> for COM exists.
>
> Second ... why do you want to run media player to play a wave file on the
> server? I would have thought you'd want to activate the script on the
client
> ...
>
> Another good idea is to check over the event viewer on the server - there
> are sometime some very revealing errors in there.
>
> Cheers,
>
> Michael.
>
> -Original Message-
> From: kai [mailto:kai_flash@;hotmail.com]
> Sent: 14 November 2002 07:20
> To: [EMAIL PROTECTED]
> Subject: [PHP] runing com
>
>
> hi guy's I have a problem running com+ code and would appreciate any help.
>
> What I like to do is have the mediaplayer run a wave file triggert from
php
> via com.
> but I can not run any example code from the help without errors.
>
>
> this code is from a the help and should work but doesn't on my mashine:
>
> // starting word
> $word = new COM("word.application") or die("Unable to instanciate Word");
> print "Loaded Word, version {$word->Version}\n";
>
> file://bring it to front
> $word->Visible = 1;
> file://open an empty document
> $word->Documents->Add();
> file://do some weird stuff
> $word->Selection->TypeText("This is a test...");
> $word->Documents[1]->SaveAs("Useless test.doc");
> file://closing word
> $word->Quit();
> file://free the object
> $word->Release();
> $word = null;
>
> This is all very basic code and should run.
> I do not have word so I tried with other apps. like wordpad or painbrush
> but allways recieve this error:
>
> Warning: Invalid ProgID, GUID string, or Moniker: Invalid syntax in
> D:\Apache\htdocs\ring.php on line 7
> Unable to instanciate ..
>
> Now I tried to give the access right's on the particular apps in dcomcnfg
> and
> also edited php.ini to
> allow Distributed-COM calls
> com.allow_dcom = true
>
>
> Does anybody can give me a run down on what I have to do exactly to get
this
> code running for
> let's say wordpad.
>
> Thank you
>
> KAi
>
>
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> _
> This message has been checked for all known viruses by the
> MessageLabs Virus Control Centre.
>
> This message has been checked for all known viruses by the MessageLabs
Virus Control Centre.
>
>
> *
>
> Notice:  This email is confidential and may contain copyright material of
Ocado Limited (the "Company"). Opinions and views expressed in this message
may not necessarily reflect the opinions and views of the Company.
> If you are not the intended recipient, please notify us immediately and
delete all copies of this message. Please note that it is your
responsibility to scan this message for viruses.
>
> Company reg. no. 3875000.  Swallowdale Lane, Hemel Hempstead HP2 7PY
>
> *



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] runing com

2002-11-13 Thread Michael Hazelden
I've been having some fun with COM myself recently ... so I can suggest a
couple of things ...

Firstly - that error would suggest to me that Word is not installed on your
machine. Remember - in order to interface with an app - it has to be there.
If it is ... try looking it up in the registry to confirm the registration
for COM exists.

Second ... why do you want to run media player to play a wave file on the
server? I would have thought you'd want to activate the script on the client
...

Another good idea is to check over the event viewer on the server - there
are sometime some very revealing errors in there.

Cheers,

Michael.

-Original Message-
From: kai [mailto:kai_flash@;hotmail.com]
Sent: 14 November 2002 07:20
To: [EMAIL PROTECTED]
Subject: [PHP] runing com


hi guy's I have a problem running com+ code and would appreciate any help.

What I like to do is have the mediaplayer run a wave file triggert from php
via com.
but I can not run any example code from the help without errors.


this code is from a the help and should work but doesn't on my mashine:

// starting word
$word = new COM("word.application") or die("Unable to instanciate Word");
print "Loaded Word, version {$word->Version}\n";

file://bring it to front
$word->Visible = 1;
file://open an empty document
$word->Documents->Add();
file://do some weird stuff
$word->Selection->TypeText("This is a test...");
$word->Documents[1]->SaveAs("Useless test.doc");
file://closing word
$word->Quit();
file://free the object
$word->Release();
$word = null;

This is all very basic code and should run.
I do not have word so I tried with other apps. like wordpad or painbrush
but allways recieve this error:

Warning: Invalid ProgID, GUID string, or Moniker: Invalid syntax in
D:\Apache\htdocs\ring.php on line 7
Unable to instanciate ..

Now I tried to give the access right's on the particular apps in dcomcnfg
and
also edited php.ini to
allow Distributed-COM calls
com.allow_dcom = true


Does anybody can give me a run down on what I have to do exactly to get this
code running for
let's say wordpad.

Thank you

KAi







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


_
This message has been checked for all known viruses by the 
MessageLabs Virus Control Centre.

This message has been checked for all known viruses by the MessageLabs Virus Control 
Centre.


*

Notice:  This email is confidential and may contain copyright material of Ocado 
Limited (the "Company"). Opinions and views expressed in this message may not 
necessarily reflect the opinions and views of the Company.
If you are not the intended recipient, please notify us immediately and delete all 
copies of this message. Please note that it is your responsibility to scan this 
message for viruses.

Company reg. no. 3875000.  Swallowdale Lane, Hemel Hempstead HP2 7PY

*

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php