Reply to php5 COM strange behaviour

Your name:

Reply:


Posted by "Martin Staiger" on 08/23/05 11:02

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 !

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация