Executing .exe files Issues

Executing .exe files Issues

am 22.01.2009 22:22:44 von Alice Wei

--_9341071e-4037-432e-84dd-c97e9f7d1860_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable


Hi=2C PHP Window Users:
=20
I have a snippet of code as in the following:
=20
$filename=3D"Test123.txt"=3B
shell_exec("C:\Inetpub\wwwroot\hello.exe -f$filename") or die ("Failed")=3B

?>
The hello.exe was written in C and is meant to produce 6 files. The issue h=
ere is that when I tried to run the PHP here=2C I keep on seeing "Failed". =
Am I not supposed to execute exe files with this method?=20
=20
Any tip on this would be great.=20
=20
Alice
____________________________________________________________ _____
Express yourself with gadgets on Windows Live Spaces
http://discoverspaces.live.com?source=3Dhmtag1&loc=3Dus=

--_9341071e-4037-432e-84dd-c97e9f7d1860_--

Re: Executing .exe files Issues

am 23.01.2009 01:50:04 von Frank Stanovcak

"Alice Wei" wrote in message
news:SNT101-W180F682380DC32DBF85BF9F0CE0@phx.gbl...

Hi, PHP Window Users:

I have a snippet of code as in the following:

$filename="Test123.txt";
shell_exec("C:\Inetpub\wwwroot\hello.exe -f$filename") or die ("Failed");

?>
The hello.exe was written in C and is meant to produce 6 files. The issue
here is that when I tried to run the PHP here, I keep on seeing "Failed". Am
I not supposed to execute exe files with this method?

Any tip on this would be great.

Alice
____________________________________________________________ _____
Express yourself with gadgets on Windows Live Spaces
http://discoverspaces.live.com?source=hmtag1&loc=us

The onlything I've seen is make sure that the function isn't disabled in
your php.ini.
Does the exe run from the command line with out php?
Does the user that php is running at have permissions to run code and access
all asscociated dirs?



--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: Re: Executing .exe files Issues

am 23.01.2009 08:39:47 von George.Pitcher

>| "Alice Wei" wrote in message
>| news:SNT101-W180F682380DC32DBF85BF9F0CE0@phx.gbl...
>|
>| Hi, PHP Window Users:
>|
>| I have a snippet of code as in the following:
>|
>| >| $filename="Test123.txt";
>| shell_exec("C:\Inetpub\wwwroot\hello.exe -f$filename") or die ("Failed");
>|
>| ?>
>| The hello.exe was written in C and is meant to produce 6 files.
>| The issue
>| here is that when I tried to run the PHP here, I keep on seeing
>| "Failed". Am
>| I not supposed to execute exe files with this method?
>|
>| Any tip on this would be great.
>|
>| Alice
>| ____________________________________________________________ _____
>| Express yourself with gadgets on Windows Live Spaces
>| http://discoverspaces.live.com?source=hmtag1&loc=us
>|
>| The onlything I've seen is make sure that the function isn't disabled in
>| your php.ini.
>| Does the exe run from the command line with out php?
>| Does the user that php is running at have permissions to run
>| code and access
>| all asscociated dirs?
>|
>|

I'll chip in my 2c's worth. I never ever got shell() or exec() to run when
using IIS, but it works every time with Apache. May be worth the switch if
you are using IIS.

Cheers

George


--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: Re: Executing .exe files Issues

am 23.01.2009 11:46:56 von Alice Wei

--_e643a643-adf5-478d-b610-8717f66bf75b_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable


> From: george.pitcher@ingenta.com> To: php-windows@lists.php.net> Date: Fr=
i=2C 23 Jan 2009 07:39:47 +0000> Subject: RE: [PHP-WIN] Re: Executing .exe =
files Issues> > >| "Alice Wei" wrote in message> >| n=
ews:SNT101-W180F682380DC32DBF85BF9F0CE0@phx.gbl...> >|> >| Hi=2C PHP Window=
Users:> >|> >| I have a snippet of code as in the following:> >|> >| > >| $filename=3D"Test123.txt"=3B> >| shell_exec("C:\Inetpub\wwwroot\hello.=
exe -f$filename") or die ("Failed")=3B> >|> >| ?>> >| The hello.exe was wri=
tten in C and is meant to produce 6 files.> >| The issue> >| here is that w=
hen I tried to run the PHP here=2C I keep on seeing> >| "Failed". Am> >| I =
not supposed to execute exe files with this method?> >|> >| Any tip on this=
would be great.> >|> >| Alice> >| ________________________________________=
_________________________> >| Express yourself with gadgets on Windows Live=
Spaces> >| http://discoverspaces.live.com?source=3Dhmtag1&loc=3Dus> >|> >|=
The onlything I've seen is make sure that the function isn't disabled in> =
>| your php.ini.> >| Does the exe run from the command line with out php?> =
>| Does the user that php is running at have permissions to run> >| code an=
d access> >| all asscociated dirs?> >|> >|> > I'll chip in my 2c's worth. I=
never ever got shell() or exec() to run when> using IIS=2C but it works ev=
ery time with Apache. May be worth the switch if> you are using IIS.> > Che=
ers> > George> >=20
=20
I belive that I am running my PHP with Apache 2.1. I will check and see if =
there is anything wrong wth the options of the code=2C but since my PHP is =
running with 755=2C it should be able to run the file=2C right?
=20
Another thing=2C does this mean that I don't have errors in my PHP?
=20
Alice> -- > PHP Windows Mailing List (http://www.php.net/)> To unsubscribe=
=2C visit: http://www.php.net/unsub.php>=20
____________________________________________________________ _____
Express yourself with gadgets on Windows Live Spaces
http://discoverspaces.live.com?source=3Dhmtag1&loc=3Dus=

--_e643a643-adf5-478d-b610-8717f66bf75b_--