php-windows Digest 23 Aug 2005 23:00:22 -0000 Issue 2757
Topics (messages 26283 through 26286):
php5 COM strange behaviour
26283 by: Martin Staiger
26284 by: Martin Staiger
Re: Getting php_zip extension to work
26285 by: Frank M. Kromann
php & DOTNET
26286 by: Peltzer, Matthew D
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[email protected]
----------------------------------------------------------------------
--- Begin Message ---
Hello NG,
we have a script to create a word-document via COM which, so far, run pretty
stable under php 4.3.7
Since we upgraded to php 5.0.3.3 the same script works only on the first
run!
On the following runs the same script causes a fatal error on the code
below:
Fatal error: Uncaught exception 'com_exception' with message 'Source:
Microsoft Word
Description: Wrong Parameter.' in [Scriptname]:65
Stack trace:
#0 [Scriptname](65): variant->GoTo('wdGoToField', 'wdGoToFirst', 1)
#1 [SourceScript] include('[Scriptname]')
#2 {main} thrown in [Scriptname] on line 65
Code :
================================================
$NumberFields = $word->ActiveDocument->MailMerge->fields->Count;
for ($CounterFields = 1; $CounterFields <= $NumberFields; $CounterFields++)
{
$word->Selection->Range->GoTo(wdGoToField, wdGoToFirst, $CounterFields);
<-- Creates Fatal Error
...
}
================================================
When we reset the Apache-Service, the script runs again once! Subsequent
calls create the same fatal error again ... we changed access-rights in
dcomcnfg which didn't show any influence ...
Environment: win 2003 server, Apache 2.0.53
I'm greatful for any hint !
--- End Message ---
--- Begin Message ---
Hello NG,
we have a script to create a word-document via COM which, so far, run pretty
stable under php 4.3.7
Since we upgraded to php 5.0.3.3 the same script works only on the first
run!
On the following runs the same script causes a fatal error on the code
below:
Fatal error: Uncaught exception 'com_exception' with message 'Source:
Microsoft Word
Description: Wrong Parameter.' in [Scriptname]:65
Stack trace:
#0 [Scriptname](65): variant->GoTo('wdGoToField', 'wdGoToFirst', 1)
#1 [SourceScript] include('[Scriptname]')
#2 {main} thrown in [Scriptname] on line 65
Code :
================================================
$NumberFields = $word->ActiveDocument->MailMerge->fields->Count;
for ($CounterFields = 1; $CounterFields <= $NumberFields; $CounterFields++)
{
$word->Selection->Range->GoTo(wdGoToField, wdGoToFirst, $CounterFields);
<-- Creates Fatal Error
...
}
================================================
When we reset the Apache-Service, the script runs again once! Subsequent
calls create the same fatal error again ... we changed access-rights in
dcomcnfg which didn't show any influence ...
Environment: win 2003 server, Apache 2.0.53
I'm greatful for any hint !
--- End Message ---
--- Begin Message ---
Hi Ross,
Try moving the extension to the Apache bin folder.
- Frank
> I have un-commented extension=php_zip.dll in my php.ini but get this
message when Apache starts:
>
> Unable to load dynamic library 'c:\php\ext\php_zip.dll' = The specified
module could not be found.
>
> Has anyone got the php_zip extension up and running successfully on
Windows?
>
> Thanks in advance ... Ross
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Does the DOTNET class work?
When I load the example code:
$stack = new DOTNET('mscorlib', 'System.Collections.Stack');
$stack->Push(".Net");
$stack->Push("Hello ");
echo $stack->Pop() . $stack->Pop();
I get a com_exception with the message: 'Failed to instantiate .Net
object [CreateInstance] [0x80070057] The parameter is incorrect'.
If I change the first line to:
$stack = new COM('System.Collections.Stack');
Everything seems to work ok.
I've seen some many-months-old posts with this same problem, but no
solutiuon or any reply at all is attached.
Also, I find if I try DOTNET/COM on apache, things crash, so for now I'm
running under IIS. I've tried php 5.0.4, and the 2005.08.22 snapshot
under IIS 5.1 (Windows XP SP1) & apache 2.0.54.0 (i.e., xampp 1.4.15).
--Matthew Peltzer
[EMAIL PROTECTED]
--- End Message ---