Any chance that your backslashes are being used as escape characters? > > Hi, > > > > On Tue, Sep 8, 2009 at 1:06 PM, Stig Manning<[email protected]> wrote: >> >> Hi Jochen, >> >> I had grief with background processes in Windows a while back, the >> solution was to use popen() to call the 'start /B' command. >> >> Code is like: >> function background_exec($command) >> { >> if(strtoupper(substr(PHP_OS, 0, 3)) 'WIN') >> { >> pclose(popen('start /B ' . $command, "r")); >> } >> else >> { >> $command $command . ' > /dev/null 2>&1 &'; >> exec($command); >> } >> } >> >> This allows any command in $command to run as a background process. This >> means PHP does NOT wait for execution. > > > Its worth a try, but doesn't seem to do anything either. Here is my > command line: > > start /B "C:\Program Files\IrfanView\i_view32.exe" > "c:\www2009\system\cache\interceptor\_Z1234_Sedex.pdf" /convert > "c:\www2009\system\cache\interceptor\_Z1234_Sedex.png" > c:\temp.log > > Can you see anything wrong with it? > > Kind Regards, > > Jochen > >> >> I don't know if this helps at all. I was doing image conversion also, >> and due to the large size of the images background processing was >> desirable. >> >> Cheers, >> Stig >> >> Jochen Daum wrote: >>> I'm stuck with running exec() on a win2003 server with Apache2 >>> installed. The command runs Irfanview to do an image conversion and >>> exec() returns 1. However nothing happens. Pasting it into a command >>> line box works fine. I can't find any errors in the Event Log, nor >>> php.log. I've also tried the live.sysinternals.com procmon.exe >>> program, but there seems to be nothing happening in regards to exec(). >>> Have also checked that exec() is not a disabled function. >>> >>> Any idea where to dig next? >>> >>> >> >> >> -- >> Stig Manning >> http://www.sdm.co.nz >> >> >> > >> > > > >
--~--~---------~--~----~------------~-------~--~----~ NZ PHP Users Group: http://groups.google.com/group/nzphpug To post, send email to [email protected] To unsubscribe, send email to [email protected] -~----------~----~----~----~------~----~------~--~---
