Welcome to WebmasterWorld Guest from 34.226.234.20

Forum Moderators: ocean10000

Message Too Old, No Replies

Configuration issue with IIS 7.0 and PHP

Calling COM objects gives a 500 error

     
11:47 am on Jan 18, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member trillianjedi is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Apr 15, 2003
posts:7256
votes: 3


Hi there,

Trying to configure a Windows IIS 7.0 server with PHP.

PHP is installed, and is working, other than one part which is with COM objects (I'm trying to interface to MS Office).

The error I get in my browser (as well as a 500 header) is:-

ModuleFastCgiModule
NotificationExecuteRequestHandler
HandlerPHP_via_FastCGI
Error Code0x00000000

The line of code causing this is:-

new COM("powerpoint.application")

PowerPoint is installed on the server, but it appears IIS doesn't have the right permissions to access COM objects?

We think this might be sorted via component services (Computers -> My Computer -> COM+ Applications) but I've had a play in there and can't find anything which looks like a solution.

So I'm hoping an IIS 7.0 expert might be able to point me in the right direction ?

Many thanks!

3:04 pm on Jan 18, 2010 (gmt 0)

Administrator

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month

joined:Jan 14, 2004
posts:864
votes: 3


I usually avoid trying to spin up Office products inside of IIS period, because of all the problems with permissions and what not. What are you trying to do with powerpoint in this case? Maybe there is a diferent way to acheive it?

Reference:
Considerations for server-side Automation of Office [support.microsoft.com]

8:59 pm on Jan 18, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member trillianjedi is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Apr 15, 2003
posts:7256
votes: 3


Hi there, thanks for that and for the link.

There are no security issues as this is not a public server. It's a server behind a corporate network that takes a .ppt file and converts to JPEG images.

All working localhost with IIS 5.0. Problem appears to be IIS 7.0 which is what's on the server, so we can't deploy.

Any thoughts/pointers ?

Thanks.

11:15 pm on Jan 18, 2010 (gmt 0)

Administrator

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month

joined:Jan 14, 2004
posts:864
votes: 3


I have a feeling it might be an identity/permission issue. Do you know what identity PHP is being run under? I am thinking that account doesn't have the necessary permissions file or registry to start up an office application. Only tools I know to see this happen in real time are Regmon and Filemon from SystemInternals. I am assuming when it fails you will be able to see the issue in these tools easy enough.

As a side note another source of tools, which might be worth you looking into is from Aspose. They provide tools to access office files without requiring office installed. They have a product called slides which might give you similar results with less hassle. I have never used them outside of Dot.net but I know they offer a COM interface for them.

(Note I am a current customer of Aspose)

11:38 pm on Jan 18, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member trillianjedi is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Apr 15, 2003
posts:7256
votes: 3


As a side note another source of tools, which might be worth you looking into is from Aspose.

That's a great steer, thank you.

Doing some due diligence now ;)

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members