php-windows Digest 23 Jan 2009 10:47:04 -0000 Issue 3558

Topics (messages 29131 through 29133):

Re: Executing .exe files Issues
        29131 by: Frank Stanovcak
        29132 by: George Pitcher
        29133 by: Alice Wei

Administrivia:

To subscribe to the digest, e-mail:
        [email protected]

To unsubscribe from the digest, e-mail:
        [email protected]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
"Alice Wei" <[email protected]> wrote in message 
news:[email protected]...

Hi, PHP Window Users:

  I have a snippet of code as in the following:

<?php
$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? 



--- End Message ---
--- Begin Message ---
>| "Alice Wei" <[email protected]> wrote in message
>| news:[email protected]...
>|
>| Hi, PHP Window Users:
>|
>|   I have a snippet of code as in the following:
>|
>| <?php
>| $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


--- End Message ---
--- Begin Message ---
> From: [email protected]> To: [email protected]> Date: Fri, 
> 23 Jan 2009 07:39:47 +0000> Subject: RE: [PHP-WIN] Re: Executing .exe files 
> Issues> > >| "Alice Wei" <[email protected]> wrote in message> >| 
> news:[email protected]...> >|> >| Hi, PHP Window 
> Users:> >|> >| I have a snippet of code as in the following:> >|> >| <?php> 
> >| $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> > 
 
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, but since my PHP is 
running with 755, it should be able to run the file, right?
 
Another thing, does this mean that I don't have errors in my PHP?
 
Alice> -- > PHP Windows Mailing List (http://www.php.net/)> To unsubscribe, 
visit: http://www.php.net/unsub.php> 
_________________________________________________________________
Express yourself with gadgets on Windows Live Spaces
http://discoverspaces.live.com?source=hmtag1&loc=us

--- End Message ---

Reply via email to