COM() hassle
Posted: Sat Feb 19, 2005 5:40 pm
I am trying to use COM to get the text content out of msword files (and put them into a database to build a full text search). The machine is a Apache running on Win2000, Microsoft Office 2000 is installed. The following problem also occurs using Office XP. Now the prob(s):
Apache crashes.
Works fine. Word starts and loads the file. if i do not use com further the script works fine and nothing extrordniary happens. BUT
and
make the server crash.
It seems like i made all required settings as the file loads. I cant understand at all, why closing the app lets the whole server go. What I already tried to fix it: Reinstalled Office. Checked, that the files will open properly if i open them manually. Wrote into thoundands of other forums where folks couldnt help me.
Would be great, if you guys had some suggestions as i carry that problem aroudn for nearly two months now and am just stuck with it.
Code: Select all
$word = new COM("Word.Application");Code: Select all
$word = com_load("Word.Application");
$word->visible = $visible ;
$word->Documents->Open($filename)Code: Select all
$word->ActiveDocument->SaveAs($filename_path, 2);Code: Select all
$word->Quit();It seems like i made all required settings as the file loads. I cant understand at all, why closing the app lets the whole server go. What I already tried to fix it: Reinstalled Office. Checked, that the files will open properly if i open them manually. Wrote into thoundands of other forums where folks couldnt help me.
Would be great, if you guys had some suggestions as i carry that problem aroudn for nearly two months now and am just stuck with it.