Menu

Trying to install on PHP 5.3, Windows7, IIS7

Help
Terry
2012-10-18
2013-04-24
  • Terry

    Terry - 2012-10-18

    I ran into problems getting this running on our dev web server, so I thought I'd try it on my laptop. I'm getting similar errors.

    When I use the constructor with the $processorPath, ie, "

    $proc = new XML_XSLT2Processor('AltovaXML','C:\Program Files\Altova\AltovaXML2013', 'COM');
    

    I get the following error:

    Uncaught exception 'com_exception' with message 'Failed to create COM object `AltovaXML.Application': The RPC server is unavailable.

    When I use null as in

    $proc = new XML_XSLT2Processor('AltovaXML',null, 'COM');
    

    I get this error:

    Uncaught exception 'com_exception' with message 'Failed to create COM object `AltovaXML.Application': Access is denied."

    Which is the correct use, and any idea what my problem is?

     
  • boen_robot

    boen_robot - 2012-10-19

    The second form is the correct one.

    About the error… It looks like the AltovaXML is not registered in COM.

    To register it, you need to run

    "C:\Program Files\Altova\AltovaXML2013\AltovaXML_COM.exe" /regserver
    

    from the command line.

    If you keep getting this error, then perhaps PHP doesn't have enough privileges to run any COM objects… If so, you'll need to run PHP as a user that has such rights (not necessarily Administrator, but still administrative rights). To grant those:
    1. Go to "Control Panel > Administrative Tools > Services".
    2. Find the Apache service.
    3. Double click to open its properties.
    4. Go to the "Log on" tab.
    5. Click the "This account" radio button.
    6. Type the username and password of an account that has administrative privileges, and click OK.

     
  • boen_robot

    boen_robot - 2012-10-19

    Actually, scratch that. I failed to notice the IIS7 part…

    In that case, if you need to grant privileges:
    1. Open IIS7's manager.
    2. Go to "Application Pools".
    3. Right click on your site's application pool and click "Advanced Settings".
    4. Click on "Process Model/Identity" and click on the "…".
    5. Select "Custom account", and click "Set".
    6. Type the username and password of an account that has administrative privileges, and click OK.

     
  • Terry

    Terry - 2012-10-19

    Thanks! That worked great! Now I've got PHP and Altova working together using basic PHP COM commands, I now want to try and go back and get your classes working as well. I seem to be getting some errors with some xml (but not all), but now I need to see if I can find out what they are.

     
  • boen_robot

    boen_robot - 2012-10-20

    That's what getErrors() is for.

    AltovaXML in particular is always outputting just the first error and terminates, so you can just use something like in the example on the linked page, and address whatever the message is pointing to.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.