mperlsyd has asked for the wisdom of the Perl Monks concerning the following question:

Hi All, I am facing a bit of a tough time with Win32::OLE (Perl version 5.12) on 64bit XP PC running Apache 2.2.All applications are on 32bit (perl,apache and third-party com object). The problem is - if i start apache as a service on Win-XP, my Cgi script doesn't create COM instance and fails with an error saying "Server execution failed" when i attempt to execute the script remotely. However when i run apache server from command prompt (not as a service) my Cgi script works fine and passes data back to remote machine without any issues. Given all applications are on 32bit, I don't think its an issue of calling a 32bit dll from within a 64bit perl process. Any idea what's going wrong? Your kind help would be greatly appreciated. Cheers

Replies are listed 'Best First'.
Re: Win32::OLE + Apache
by BrowserUk (Patriarch) on May 02, 2011 at 11:36 UTC

    The most likely cause given the description is a permissions problem. The account under which Apache runs doesn't have the same privileges as the account you use when running from the command line.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      Yes i suspect that's the case as well however i have tried to start Apache as "Local System" account (limited permission) and as system administrator on XP box but with no luck. Cheers