php.net |  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: php-4.0-Win32-06-06-2001.zip OS: NT 4.0 sp6 plus MS Office 97 SR-
Private report: No CVE-ID: None
 [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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-31 07:56 UTC] phanto@php.net
com in 4.0.5 is broken.
maybe you should read http://www.php.net/bugs-dos-and-donts.php 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] phanto@php.net
if this bug report is still accurate, reopen it. it seems that it was lost somehow or i just didn't see it. sorry.

harald.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 07 05:01:29 2024 UTC