DCOM Event ID 10010 – Excel.Application called by PHP CGI at IIS: server failed to start

I

Internethering

Hey, I've here an event 10010 problem, the windows event log says: ‚The server "{00024500-0000-0000-C000-000000000046}" did not register with DCOM within the required timeout.’

It's a PHP 5.4 Application, which runs als CGI process inside an IIS. Here is the code:

<?php
$oExcel = new COM('Excel.Application');
$oExcel->Visible = true;

//$this->getLogger()->debug('Opening inbound-file');
$oBook = $oExcel->Workbooks->Open('C:\inetpub\wwwroot\tmp\xls1D2B.tmp', 0, true);

//$this->getLogger()->debug('Saving csv-file');
$oExcel->DisplayAlerts = false;
// XlFileFormat Enumeration [Excel 2007 Developer Reference]
$oBook->SaveAs('C:\inetpub\wwwroot\tmp\xls1D2B.csv', 6);
?>

When I run it by calling in the browser, Microsoft Excel get's started but the process doesn't generate xks1D2B.csv. It's end with the event 10010 and in the browser I get an: Failed to create COM object `Excel.Application':The server failed to start

When I open cmd.exe and run php -f test.php with above code, the Excel creates xks1D2B.csv. I set full access to IIS Users at dcomcnfg and at regedit for CSLID {00024500-0000-0000-C000-000000000046}. Any tips?


some informations about system:

  • Windows Server 2016 Essentials
  • PHP 5.6.40
  • Office 2013 Home and Business

Continue reading...
 
Back
Top Bottom