Re: win xp exec() question
| From: | David Marr | Date: | Tue, 06 May 2003 15:06:41 +0000 |
| Subject: | Re: win xp exec() question | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-146529@lists.php.net to get a copy of this message | ||
Its because PHP prepends "cmd.exe /c" when you run something using exec() or
system() in Windows. You need to give IUSR read/execute rights to cmd.exe..
Just be warned this is a big security risk and not recommended to do. I
havent found any way around this.
"David Robley" <robleyd@ozemail.com.au> wrote in message
news:MPG.191e385767aa39e9897ea@news.php.net...
> In article <BB41A616-7CD1-11D7-9BB1-00306540D594@awn.com>, mike@awn.com
> says...
> > This works perfectly from a command window but doesn't work from a php
> > page, why?
> > (Note: There is a path variable set for mogrify)
> >
> > $cmd = "mogrify -resize 200x134 \"C:\\Apache\\myDocs\\myImage.jpg\"";
> > exec($cmd , $results);
>
> Does php necessarily inherit the same environment under xp as a 'regular'
> user? What do you get if you try and show the path settings from within
> php?
>
> --
> Quod subigo farinam
>
> $email =~ s/oz$/au/o;
>