Re: RESOLVED: RE: At my wit's end - For some reason abiword.exe will not execute via command line called via PHP4.4/IIS 7/ Windows Server 2008
"J.M. Maurer" <[email protected]>
| Newsgroups | gmane.editors.abiword.user,gmane.editors.abiword.devel |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 2010-11-26 at 06:45 -0500, El Shami, Hesham wrote: > Success. > > I used sysinternals' procmon to identify what was stiking, and found out that abiword needed write access to c:\windows\system32\config\systemprofile > > I achieved this by allowing nt authority\network service full access to this location. > > Here's the entry from procmon that shed light: > > 09:33.3 AbiWord.exe 1764 CreateFile C:\Windows\System32\config\systemprofile ACCESS DENIED Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a Hmm, weird. I don't see why we should need access that that directory. Maybe we ship a dependency that needs it. Thanks for figuring it out! Marc > > Regards, > > Hesham > > -----Original Message----- > From: [email protected] [mailto:[email protected]] On Behalf Of El Shami, Hesham > Sent: Friday, November 26, 2010 5:55 AM > To: Dominic Lachowicz; Martin Sevior > Cc: [email protected]; abiword-dev > Subject: RE: At my wit's end - For some reason abiword.exe will not execute via command line called via PHP4.4/IIS 7/ Windows Server 2008 > > > Thank you Dominic, > > I tried that. Same problem. > I've even run it without cmd (via shell run). > > In both cases I can see the process running via sysinternals' process explorer and can tell that it's parent process is w > > $command = "AbiWord.exe d:\\php44\\test.DOC --to=html --to-name=d:/testout/test.HTML"; > $WshShell = new COM("WScript.Shell"); > $oExec = $WshShell->Run($command, 0,true); > echo $oExec; > exit; > > This returns : -1073741819 > > What gets me is that the same php code runs fine on my other server (win2003). > > In addition on the offended server (whichi is server 2008), the application event log shows error: > > Log Name: Application > Source: Application Error > Date: 11/26/2010 5:29:53 AM > Event ID: 1000 > Task Category: (100) > Level: Error > Keywords: Classic > User: N/A > Computer: server.domain > Description: > Faulting application AbiWord.exe, version 2.6.4.0, time stamp 0x487bbcbb, faulting module AbiWord.exe, version 2.6.4.0, time stamp 0x487bbcbb, exception code 0xc0000005, fault offset 0x00282918, process id 0xb6c, application start time 0x01cb8d54dcba910b. > Event Xml: > <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> > <System> > <Provider Name="Application Error" /> > <EventID Qualifiers="0">1000</EventID> > <Level>2</Level> > <Task>100</Task> > <Keywords>0x80000000000000</Keywords> > <TimeCreated SystemTime="2010-11-26T10:29:53.000Z" /> > <EventRecordID>6959</EventRecordID> > <Channel>Application</Channel> > <Computer>server.domain</Computer> > <Security /> > </System> > <EventData> > <Data>AbiWord.exe</Data> > <Data>2.6.4.0</Data> > <Data>487bbcbb</Data> > <Data>AbiWord.exe</Data> > <Data>2.6.4.0</Data> > <Data>487bbcbb</Data> > <Data>c0000005</Data> > <Data>00282918</Data> > <Data>b6c</Data> > <Data>01cb8d54dcba910b</Data> > </EventData> > </Event> > > I did some snooping around and looks like access violation of some kind, I just can't figure what. > > > > -----Original Message----- > From: Dominic Lachowicz [mailto:[email protected]] > Sent: Thursday, November 25, 2010 10:02 PM > To: Martin Sevior > Cc: El Shami, Hesham; [email protected]; abiword-dev > Subject: Re: At my wit's end - For some reason abiword.exe will not execute via command line called via PHP4.4/IIS 7/ Windows Server 2008 > > If I remember correctly, AbiWord on Windows detaches itself from the calling command console. Instead of calling AbiWord directly, invoke it via 'cmd /wait abiword arguments'. Give that a shot, and let me know if it works. > > On Thu, Nov 25, 2010 at 9:47 PM, Martin Sevior <[email protected]> wrote: > > > > Hi Hersam, > > > > I'm forwarding your problem to the abiword development list. Sorry I'm > > a linux guy so I have idea what is going wrong here. I know that > > abiword is used in server mode routinely on linux systems in mission > > critical applications. For example our website, http://abicollab.net > > has long-running abiword processes for much of it's functionality. > > > > Hopefully someone on the abiword-devel list can help you with your > > abiword on windows server problem. > > > > Best regards, > > > > Martin > > > > On Thu, Nov 25, 2010 at 5:27 AM, El Shami, Hesham > > <[email protected]> wrote: > >> Hi everyone, > >> > >> Any guidance you can provide is much appreciated. I just need another pair of eyes or brains to hint me what else I should be looking at. > >> > >> The problem description: > >> I can run the command line fine if I log in myself (Administrator) onto the server and run it. So I know abiword works. > >> The trouble comes when I try to execute the same command line through PHP. > >> > >> Details: > >> > >> I've provided fully security permissions anywhere from local admin, network services, everyone, iis_iusrs... To both the locaion where abiword resides and to the target location where the converted file is to be dumped. > >> > >> I've also added abiword directory into the windows path and called abiword.exe by name alone (not specifying the path). > >> > >> I get an error number when executed via php using the exec function. The returned value is -1073741819. > >> > >> I've run other command line utilities via PHP from the same location and targetting the same target locations to see if permissions are fine, and that works fine. > >> > >> If I run the exact same logged command myself on the server, it runs successfully. > >> > >> I've made a makeshit log , and here's what I have: (a return value of 0 is desirable). > >> > >> 2010-11-24 11:48:13 - command:AbiWord.exe > >> d:\\php44\\TEMP\0a040e82-41cd-aa34.DOC --verbose=0 --to=html > >> --to-name=D:/TSC/files/KB044757/44757.HTML > >> 2010-11-24 11:48:17 - command executed:-1073741819 > >> 2010-11-24 11:48:17 - command executed: > >> 2010-11-24 11:48:17 - command:set > >> 2010-11-24 11:48:17 - command executed retval:0 > >> 2010-11-24 11:48:17 - command executed > >> arrayjoin:ALLUSERSPROFILE=C:\ProgramData > >> APPDATA=C:\Windows\system32\config\systemprofile\AppData\Roaming > >> APP_POOL_ID=DefaultAppPool CommonProgramFiles=C:\Program Files\Common > >> Files COMPUTERNAME=server-AB-1234 ComSpec=C:\Windows\system32\cmd.exe > >> FP_NO_HOST_CHECK=NO > >> LOCALAPPDATA=C:\Windows\system32\config\systemprofile\AppData\Local > >> NUMBER_OF_PROCESSORS=1 OS=Windows_NT > >> Path=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;d:\php44 > >> ;d:\abiword;d:\abiword\abiword;d:\abiword\abiword\bin > >> PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC > >> PHPRC=D:\PHP44 PROCESSOR_ARCHITECTURE=x86 PROCESSOR_IDENTIFIER=x86 > >> Family 6 Model 15 Stepping 8, GenuineIntel PROCESSOR_LEVEL=6 > >> PROCESSOR_REVISION=0f08 ProgramData=C:\ProgramData > >> ProgramFiles=C:\Program Files PROMPT=$P$G PUBLIC=C:\Users\Public > >> SystemDrive=C: SystemRoot=C:\Windows TEMP=C:\Windows\TEMP > >> TMP=C:\Windows\TEMP USERDOMAIN=ADP1 USERNAME=server-AB-1234$ > >> USERPROFILE=C:\Windows\system32\config\systemprofile > >> windir=C:\Windows > >> 2010-11-24 11:48:17 - command:nbtscan.exe -V > > >> d:\tsc\files\nbtscan_version.txt > >> 2010-11-24 11:48:17 - command executed retval:0 > >> 2010-11-24 11:48:17 - command executed arrayjoin: > >> 2010-11-24 11:48:17 - command:AbiWord.exe d:\php44\test.DOC > >> --verbose=2 --to=html --to-name=44752.HTML > >> 2010-11-24 11:48:21 - command executed retval:-1073741819 > >> 2010-11-24 11:48:21 - command executed arrayjoin: > >> > >> > >> > >> Regards, > >> > >> Hesham El Shami > >> Operations Specialist - Technology Support Centre CIBC - End User > >> Services > >> Telephone: 416-681-7400 x 8304 > >> mailto:[email protected] > >> > >> This message, including any attachments, is intended for only the use of the individual(s) to which it is addressed and may contain information that is privileged / confidential. Any other distribution, copying or disclosure is strictly prohibited. If you are not the intended recipient or have received this message in error, please notify us immediately by reply e-mail and permanently delete this message including any attachments, without reading it or making a copy. > >> > >> P Please consider your environmental responsibility before printing > >> this e-mail > >> > >> Thank you. > >> > >> > > ----------------------------------------------- > > To unsubscribe from this list, send a message to > > [email protected] with the word unsubscribe in the > > message body. > > > > > > -- > "I like to pay taxes. With them, I buy civilization." -- Oliver Wendell Holmes > ----------------------------------------------- > To unsubscribe from this list, send a message to [email protected] with the word unsubscribe in the message body. > ----------------------------------------------- > To unsubscribe from this list, send a message to > [email protected] with the word > unsubscribe in the message body. ----------------------------------------------- To unsubscribe from this list, send a message to [email protected] with the word unsubscribe in the message body.