Com Support

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

Post Reply
roguia
Forum Newbie
Posts: 8
Joined: Thu Feb 27, 2003 12:12 am

Com Support

Post by roguia »

good morning
when i used localhost as server, the com support excecuted very well,
but when i use my ip adress as server i obtain an error .
this is what i did:
$excel=new com("execl.application",$ip_adress);
and this is the error :
Unable to obtain IDispatch interface for CLSID {00020820-0000-0000-C000-000000000046}: acces denied. in C:\rep\test.php on line 2
when i use localhost :
i can instantiate only word but about ecxel i obtain this error:
Unable to obtain IDispatch interface for CLSID {00020820-0000-0000-C000-000000000046}: server can't be excuted in C:\rep\testexcel.php on line 2
ca you help me?
thank you
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

http://de.php.net/manual/en/class.com.php
To allow DCOM com.allow_dcom has to be set to TRUE in php.ini.
and you must have been granted access to that component.
But why do you want to use the second parameter anyway? Isn't the component located on the same server?
roguia
Forum Newbie
Posts: 8
Joined: Thu Feb 27, 2003 12:12 am

Post by roguia »

hello,
of course,I have made the changes in my php.ini 8) ,
and i put the second parameter because i don't want using localhost ,but my IP_ADRESS
I can instantiate only word when using localhost ,but when i use my ip_adress i can't instantiate anything
Can some one tell me why?
thank you
Post Reply