Hi Jochen,
I've had similar issues to this before. Its a right pain to try and
solve. Most of my work on Windows has been with IIS and not Apache
specifically so these things might be IIS specific things, I'm not sure.
1. scripts need to be explicitly run from cmd
eg. exec("cmd /c ". escapeshellcmd("mybatscript.bat"));
2. File Permissions need to be set correctly for the web user to allow
execution. If your using the example above, cmd.exe needs execute
permission.
3. The directory where the file are to be saved needs write access to the
web user.
4. If the program creates temp files, write permission needs to be granted
to the place where those files are created.
Hope this helps.
Aaron
>
> Hi all,
>
> 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?
>
> Kind Regards,
>
> Jochen Daum
>
> Chief Automation Officer
> Automatem Ltd
>
> Phone: 09 630 3425
> Mobile: 021 567 853
> Email: [email protected]
> Skype: jochendaum
> Website: www.automatem.co.nz
> http://twitter.com/automatem
> http://www.xing.com/go/invite/3425509.181107
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]
-~----------~----~----~----~------~----~------~--~---