Apache als Dienst verursacht "com_exception" Fehler

Irgendwelche Probleme mit XAMPP für Windows? Dann ist hier genau der richtige Ort um nachzufragen.

Apache als Dienst verursacht "com_exception" Fehler

Postby jaegerschnitzel » 10. October 2012 15:31

Sobald ich Apache als Dienst laufen habe, bekomme ich folgenden Fehler:

Code: Select all
Fatal error: Uncaught exception 'com_exception' with message '<b>Source:</b> Unknown<br/><b>Description:</b> Unknown' in C:\xampp\htdocs\.....


Mein PHP-Code lautet:

Code: Select all
function IT_Execute($command)
{
    $conn = new com("Test.Applikation");
    $m1 = 1;
    $m2 = 2000;
    $erg = $conn ->settimeout($m1, $m2);
    $erg = $conn ->Execute($command);
}


Ich weiß nicht schön, aber funktioniert, sobald Apache nicht als Dienst installiert ist und vom Control-Panel aus gestartet wird.

Habe schon alles Versucht. Den Dienst mit anderen Benutzern bzw. Rechten zu starten, andere XAMPP Versionen getestet, diverse COM-Einstellungen in der php.ini und mehrere Stunden gegoogelt. Auch diesen und viele ähnliche Tipps habe ich erfolglos probiert: http://figured-it-out.com/figured-out.php?sid=24

An meiner Anwendung oder am PHP-Code kann es nicht liegen, da es ohne Dienst ja funktioniert.

Ich hoffe jemand hat noch nen Tipp!
jaegerschnitzel
 
Posts: 6
Joined: 13. February 2007 18:18

Re: Apache als Dienst verursacht "com_exception" Fehler

Postby jaegerschnitzel » 11. October 2012 10:30

Könnte das Problem damit zusammenhängen?
If you try to launch GUI apps from a service in Vista, you'll have lots of trouble. As a security feature, Vista mediates the interaction of services with the desktop using 'Interactive Services Detection'.

That means, if you are running PHP as a module of an Apache service, you won't be able to launch GUI apps using any method. This kind of thing just won't work:

$WshShell = new COM("WScript.Shell");
$oExec = $WshShell->Run("notepad.exe", 7, false);

So, if you want to use Apache/PHP as a proxy for launching GUI apps, you'll need to run Apache as a console application.

First, if Apache is already installed as a service, you'll need to set it's startup type to "manual" using the services snap-in. (%SystemRoot%\system32\services.msc) Search for Services in the start menu search box.

Then add a shortcut to C:\apache\bin\httpd.exe (or wherever Apache is installed) to your Startup folder, and set that shortcut to start minimized. You can use an app like TrayIt! to force Apache down into the system tray.

Then use any of the methods outlined on the PHP website and you will be able to open a Windows application from PHP and see it's GUI.

Sieht fast danach aus.
jaegerschnitzel
 
Posts: 6
Joined: 13. February 2007 18:18


Return to XAMPP für Windows

Who is online

Users browsing this forum: stp1963 and 41 guests