By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,379 Members | 3,035 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,379 IT Pros & Developers. It's quick & easy.

PHP communicating to a COM object

P: n/a
Have a client requirement for a cms system, which I am proposing to be
done with a PHP open source system (phpwcms). The client already has a
client login authentication script running off of a customized
windows-based COM object. Is it possible for PHP to communicate with
this object (which will return session variables)... making them
available to other PHP-based scripts relying on sessions.

Anyone with experince at this (if doable) would be willing to work
with, within the scope of this project (at approval stage right now)
Cheers,
John

- first post here -

Jul 17 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
jsw_nz wrote:
Have a client requirement for a cms system, which I am proposing to be
done with a PHP open source system (phpwcms). The client already has a
client login authentication script running off of a customized
windows-based COM object. Is it possible for PHP to communicate with
this object (which will return session variables)... making them
available to other PHP-based scripts relying on sessions.

Anyone with experince at this (if doable) would be willing to work
with, within the scope of this project (at approval stage right now)
Cheers,
John

Oh, its absolutely doable:

http://no2.php.net/manual/en/ref.com.php
I've had several clients requesting interaction with and tasks performed
via COM, it's not that hard to get working, read the manual and do some
experimenting. You'll have it in a few days.

--
Thomas

SELECT date FROM wife WHERE bitching = '0' AND sex = '1'
Jul 17 '05 #2

P: n/a

"jsw_nz" <js***@xtra.co.nz> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
Have a client requirement for a cms system, which I am proposing to be
done with a PHP open source system (phpwcms). The client already has a
client login authentication script running off of a customized
windows-based COM object. Is it possible for PHP to communicate with
this object (which will return session variables)... making them
available to other PHP-based scripts relying on sessions.

Anyone with experince at this (if doable) would be willing to work
with, within the scope of this project (at approval stage right now)
Cheers,
John

- first post here -


PHP does support COM. Be sure to load test the system though, because it has
a way of leaking memory.
Jul 17 '05 #3

P: n/a
Chung Leong wrote:

PHP does support COM. Be sure to load test the system though, because
it has
a way of leaking memory.

Hello Chung and Thomas,

Thanks both for your replies....in a quandry however, since your
answers differ. My thinking would be there may be some
workaround/translation layer to get php to instantiate the COM and get
results based on successful login...either the session variables set
directly by COM (readable by php?) or on the other hand an object sent
back to php, having the session variables instantiated there....your
thoughts...

Cheers,
John

Jul 17 '05 #4

P: n/a
Hello Chung and Thomas,

Thanks both for your replies....My thinking would be there may be some
workaround/translation layer to get php to instantiate the COM and get
results based on successful login...either the session variables set
directly by COM (readable by php?) or on the other hand an object sent
back to php, having the session variables instantiated there...any
additional insights appreciated here. Can session variables be created
from COM environment and be read by php?

All best, John

Jul 17 '05 #5

P: n/a
"jsw_nz" <js***@xtra.co.nz> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
Chung Leong wrote:

PHP does support COM. Be sure to load test the system though, because
it has
a way of leaking memory.

Hello Chung and Thomas,

Thanks both for your replies....in a quandry however, since your
answers differ. My thinking would be there may be some
workaround/translation layer to get php to instantiate the COM and get
results based on successful login...either the session variables set
directly by COM (readable by php?) or on the other hand an object sent
back to php, having the session variables instantiated there....your
thoughts...

Cheers,
John


Presumably there would be a method on the object that return some kind of
value. Based on that value you set a session variable in PHP to indicate
that the user has logged in successfully. Something like the following

$Bob = COM("qwerty.asdfg");
if($Bob->Autheticate($username, $password)) {
$_SESSION['login'] = true;
}
Jul 17 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.