DCOM in PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

psmshankar
Forum Commoner
Posts: 96
Joined: Tue Aug 06, 2002 4:25 am
Location: India

Post by psmshankar »

Hi Volka,

First of all the machine which has to instantiate the COM object from another server is now WINDOWS 2000...today they hav moved to this....

so now my application on win2k has to instantiate an COM object in Windows 98 machine....

1. I checkd the Apache server log...there is no such indication as far i know..
2.
if it is an array it fetches the entries
server_name["Username"]
server_name["Domain"]
server_name["Password"]
server_name["Flags"]
if you do not set these values it ....
where to set these????

3. my apache webserver on win2k runs under admin account
4. I think with this account you cannot log in win98 machine... i am as well not much good in network etc...
5. In which machine u want to run dcomcnfg util??
Only in Win98 machine server my COM object is?? do u wanna run here??
When i run it asks me to configure the win98 server security to 'user level'?
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

I have to admit that I'm even less familiar with DCOM/win98 than with the D in DCOM in general ;)
So I asked someone else who I believed to know something about it.
  • these are the results
  • since you got dcomcnfg.exe you have dcom98 v1.3
  • user-level access control is a must.
  • if you can't enable user-level security install ie5 or later since it will install the necessary files by default
afaik everybody (every account) that is allowed to create an instance local is allowed to do it via remote call unless dcom is told otherwise. But no account, no permission (just as reminder: afaik)
psmshankar
Forum Commoner
Posts: 96
Joined: Tue Aug 06, 2002 4:25 am
Location: India

Post by psmshankar »

Hi volka...
thanks for your patience and help...

ok i hav given user lever access..in win98 machine...
it asks 'where to obtain the user and group list'??
here do i have to give the Win2k server name???(e-com)
i gave that win2k server name....it says it could not find the security provider....and asked whether stick to this name(e-com)..i said yes...

i run the dcomcnfg in win98 then, and chose my COM object and look for its properties...
Under the General Tab
--------------------------
Application name: blah..blah..
Application Type: remote server
Remote computer: e-com

Under Location tab
---------------------
i choose both
1. Run application in the serverwhere data is located
2. Run application on following computer (i gave e-com)


Then i run my php application in Win2k server(e-com) but still got the error
Warning: DCOM disabled in..........php at line 25
so i chked this error and the solution in the php manua is that we need to edit php.ini file and add 'com.allow_dcom=true'
this i have done already...then y the same error???

I am more confused...and donno where the problem lies???? but one thing is that there is something i need to do which i am not gettin....

can u pls tell me step-by-step what u did for ur DCOM application??

Thanks
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

I'm sorry. Never used PHP for (D)COM. My applications were written in C++ where I used CoCreateInstanceEx and the account was either for a domain or valid on both client and server which were w2k-PCs.
Warning: DCOM disabled in..........php at line 25
try to fetch the runtime-value of com.allow_dcom in your script, i.e.

Code: Select all

var_dump(ini_get('com.allow_dcom'));
what does this print?
psmshankar
Forum Commoner
Posts: 96
Joined: Tue Aug 06, 2002 4:25 am
Location: India

Post by psmshankar »

Hi,

it returns empty string...
string(0) ""
what does it means??? i have given the value = true in php.ini file???
means it is not taken in to effect is it??? i have written the COM codes as seperate directive after [sockets] in php.ini file
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

are you sure you did it in the used php.ini-file?
maybe try it with com.allow_dcom = true.
Take a look at <?php phpinfo(); ?> , it tells you the php.ini-path, i.e.
Configuration File (php.ini) Path C:\WINNT\php.ini
then check again the section
com
Directive Local Value Master Value
If nothing helps consider upgrading your php-version
psmshankar
Forum Commoner
Posts: 96
Joined: Tue Aug 06, 2002 4:25 am
Location: India

Post by psmshankar »

hi volka

s ..i chked it up...its picking from the correct php.ini file only.

and i updated to 4.2.3 version....but apache could not start???
any changes i need to make in apache???
i used 4.2.3 windows installer exe...and selected advance and then choose apache as web server...
apache was there previously...
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

did you installed to the same directory the old version was?
What is the error message you get when you try to start apache now?
psmshankar
Forum Commoner
Posts: 96
Joined: Tue Aug 06, 2002 4:25 am
Location: India

Post by psmshankar »

yes..i installed in the same directory...
there is no indicative error in apache log..
but when i run php.exe in the command prompt, it says errors in
php_gd.dll, php_pdf.dll and php_zlib.dll - that these extension libraries cannot be loaded - "load library error"
when i tried to register these dlls seperately also i get the same error...
:(
ofcourse i have copied all the extension dlls to my windows system diretory....
when i comment the above extensions in the php.ini file
under "Windows Extensions" directive, everything is fine and no error at all... and when i run phpinfo() then it shows allow_dcom value is "on"...
under the path and extension directive, the value of extension_dir is correct...
Post Reply