|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11195 COM Visible=1 causes access violation in Apache
Submitted: 2001-05-30 10:48 UTC Modified: 2001-10-04 14:36 UTC
From: peter at helpnet dot com dot au Assigned:
Status: Closed Package: COM related
PHP Version: OS: NT 4.0 sp6 plus MS Office 97 SR-
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: peter at helpnet dot com dot au
New email:
PHP Version: OS:


 [2001-05-30 10:48 UTC] peter at helpnet dot com dot au
PHP 4.0.5 COM
The following code makes Apache blow up with an access violation:
if($w = new com("word.application"))
if($w->Visible = 1)
      print("<br>Word should be visible." );

I tried it with PHP 4.0.5 and Apache 1.13.19 then updated Apache to 1.13.20 with the same result.

Reverting to PHP 4.0.4pl1 stopped Apache blowing up but Word is not becoming visible, which indicates the Visible property is not doing anything.

Apache runs PHP as isapi and here is the relevant part of the .conf:
LoadModule php4_module "c:/Program files/php/sapi/php4apache.dll"
AddType application/x-httpd-php .html
AddType application/x-httpd-php .php

Because Word is not becoming visible, some Word error messages are not displayed and the results of unanswered errors, explaining some of the weird problems people report with COM, such as applications locking up on second and subsequent entry.

If I manually make Word visible, by starting the application, the document handled by COM does not become visible and the errors remain locked up.

I am using NT 4.0 with SP6 and MS Office is 97 with SR-2. 97 is the latest release I can install without being stuck with Internet Exploder.

If you have a binary to test, I can install it any time. I will use COM on 4.0.4pl1 for a couple more days then go back to 4.0.5 so I can experiment with the lastest functions for images.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-31 07:56 UTC]
com in 4.0.5 is broken.
maybe you should read too.
 [2001-05-31 08:15 UTC] peter at helpnet dot com dot au
I read the dos and donts. How do I add new information to an existing bug report if I am neither the author or in the development team?

The existing bug report that I found, was Win2000, did not blow up Apache and seemed to produce a problem well after the point where you would use the COM visible property.

The report had a suggestion to try 4.0.4 but no result of using 4.0.4. I found 4.0.4 would run without crashing Apache, but was not actually working to the point where I could use it to develop a COM based operation. Without the ability to read the application error messages, I had to create each action in Visual Basic then translate by trial and error.

The previous report did not mention the Apache release, presumably because the symptoms did not include Apache exploding.

I thought the information would be of use and volunteered for testing the next update. I could also add to the online documentation if it would help.
 [2001-06-07 06:15 UTC] peter at helpnet dot com dot au
I uploaded the latest binary I could find and there was an improvement. It output an error message saying "visible not found".

I removed all the optional extensions but that did not help. I found the temp directory filling up with Word's work files so Word is not shutting down the session correctly. I found some of the temp files were locked for update so Word must still have a hold.

I found the test would run to completion, without an Apache error, one after a clean boot. On the second test, the page would return then Apache dumps. On the third and subsequent tests, the page headings appear then Apache dumps.
 [2001-10-04 14:36 UTC]
if this bug report is still accurate, reopen it. it seems that it was lost somehow or i just didn't see it. sorry.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Mar 24 19:03:39 2023 UTC