Discussion: p-s-e-x-e-c
Afficher un message
Vieux 18/10/2007, 20h41   #4
David Giragosian
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] p-s-e-x-e-c

On 10/18/07, Philip Thompson <philthathril@gmail.com> wrote:
>
> On 10/18/07, Instruct ICC <instructicc@hotmail.com> wrote:
> >
> >
> > > Hi. I'm wanting to run an executable that generates a text file, and

> I'm
> > > having some issues. When I run the command on the server itself, it

> > works
> > > just fine. When I run the same command via a webpage, the text file

> does
> > not
> > > generate. My first impression was that the permissions were wrong. So,

> I
> > > gave the web user and the user making the call the necessary

> > permissions...
> > > no luck. Here's what I'm doing...
> > >
> > > $command = "psexec.exe -i -w C:/Folder -u user -p pass -e
> > > C:/Folder/executable.exe 2>&1";
> > > exec ($command);
> > > ?>
> > >
> > > This should generate this file but doesn't: C:/Folder/printer_list.txt
> > >
> > > Again, when this exact statement is run in the terminal on the Win2k3
> > > server, it works fine. Any thoughts?
> > >
> > > Thanks in advance,
> > > ~Philip
> > >
> > > PS... Side note: the list rejected my original email b/c of the

> subject:
> > > 'Psexec'. Odd.

> >
> > Maybe you need the full path to psexec.exe
> >
> > Or the web server isn't allowed to use exec due to safemode
> > http://php.he.net/manual/en/features....functions.php
> > or disable_functions in php.ini.

>
>
> Those are good suggestions. Unfortunately, I did try the full path to
> psexec.exe, safe_mode is NOT enabled and there are no functions listed as
> disabled.
>
> I have Google'd, but haven't been successful finding a solution. Anything
> else? =/



Maybe try the command with the backtick operator instead of exec...

David

  Réponse avec citation
 
Page generated in 0,07896 seconds with 9 queries