Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2012

    Unanswered: Open PowerPoint file from PHP

    Hi, I'm trying to open and edit a PPT file from php.
    The code is:

    $ppApp = new COM("PowerPoint.Application");
    //Abrir archivo PPT

    This code is working fine if I run it from my machine.
    When I try to run it from another server I get the following error:

    Fatal error: Uncaught exception 'com_exception' with message 'Source: Microsoft Office PowerPoint 2007 Description: PowerPoint could not open the file.' in C:\inetpub\wwwroot\phptest\ppt.php:33 Stack trace: #0 C:\inetpub\wwwroot\phptest\ppt.php(33): variant->Open('http://net.entr...', false, false, false) #1 {main} thrown in C:\inetpub\wwwroot\phptest\ppt.php on line 33

    Could you help me with this error, please?

    Someone told me that may be a problem with the library, maybe it is not installed ok or because the php is not including it explicity. But this file is working in one machine, so it is OK.

    I forward for a response.


  2. #2
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    my reading of that error message is that the library to handle powerpoint is working OK, the fault lies in that the application cannot open the file.
    to make your code more fault tolerant you should probably check the FILE_EXISTS
    I'd rather be riding on the Tiger 800 or the Norton

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts