PHP COM Interop causes Apache access violation error

Problems with the Windows version of XAMPP, questions, comments, and anything related.

PHP COM Interop causes Apache access violation error

Postby Xethyr » 06. October 2008 16:26

I'm trying to run some example PHP code that uses COM:

Code: Select all
// starting word
$word = new COM("word.application") or die("Unable to instantiate Word");
echo "Loaded Word, version {$word->Version}\n";

//bring it to front
$word->Visible = 1;

//open an empty document

//closing word

//free the object
$word = null;

It works fine the first time, but when I run it a second time, the page doesn't load, and I get an Apache error. When I debug it, it says Apache got an access violation error. Any suggestions?

I'm using XAMPP Lite 1.6.8.
Posts: 1
Joined: 06. October 2008 16:23

Postby glitzi85 » 06. October 2008 16:30

Never worked with COM, but i had to program access to Excel via and there i got in troubles because vb didn't close Excel correctly, even when i used the correct code.

It's just a guess, but look into your Taskmanager whether Word is really closed or not.

User avatar
Posts: 1920
Joined: 05. March 2004 23:26
Location: Dahoim

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 71 guests