Page 1 of 1

Script with COM works from command line but no from browser

Posted: Wed Aug 24, 2005 2:14 am
by marcpeterson
I have a very simple script calling a COM dll that I registered with regsvr32. Using a browser, the php script crashes. But if I use the command line and type c:\php.exe c:\path to script\script.php then it works fine. It also works fine from the browser if run on other systems with php installed.

I'm using Windows XP Pro with IIS and PHP ver 4.4.0.

I'm guessing it's an issue with the COM object and the account used to call it...? Anyone have any ideas? Thanks.

Re: Script with COM works from command line but no from brow

Posted: Wed Aug 24, 2005 7:16 am
by feyd
marcpeterson wrote:I'm guessing it's an issue with the COM object and the account used to call it...?
those would be my guess too, the latter more than the former though.

Posted: Wed Aug 24, 2005 11:20 am
by marcpeterson
Any idea how I change the account used to access COM objects through php? I'm thinking it's the php executable or dll itself that is getting run under the wrong account (since doing it from the command line works).

Posted: Wed Aug 24, 2005 12:12 pm
by feyd
most often, php is run under the user that owns the web server process.