Re: Trouble with system() function

From: Ian.H (ian_at_WINDOZEdigiserv.net)
Date: 04/09/04


Date: Fri, 09 Apr 2004 03:19:28 GMT

On Thu, 08 Apr 2004 21:12:03 -0400, Penn Markham wrote:

> Ian,
>
> Thanks for the advice. I tried using shell_exec, but this did not work
> either. It's weird, if I run that part of the script from the command
> line, it works fine and the password gets changed. If I run it from my
> web page, it doesn't. I'm beginning to wonder if maybe this is a PHP or
> Apache configuration issue.
>
> PENN

The important part wasn't really the shell_exec().. apologies for not
clarifying this. This performs the same task as backticks (``) in which
you can capture the return value rather than just dumping it on the page
there and then.

The real important part I found was the " 2>&1" part. Without it.. it
doesn't work (or wouldn't for me anyway). I'm not sure if you added this /
noticed it as such.. but this _may_ be the answer although obviously I
can't guarantee it.

Out of curiousity.. what happens if you cut / paste one of the lines (with
/ without MD5 usage) from my example instead of your code you have
currently? Just curious to see if what I have works for you too. If so..
you can work out the differences and sort yourself a tailored copy for
your requirements =)

Regards,

  Ian

-- 
Ian.H
digiServ Network
London, UK
http://digiserv.net/


Relevant Pages

  • Comparison Script Components with Script Classes
    ... Now I would like to have some advice from more experienced programmers. ... I do not really figure out, how the concepts of Script Components and Script Classes differ and for what use cases they are intended. ... How do you build your strictly object-oriented libraries in VBScript? ...
    (microsoft.public.scripting.vbscript)
  • Re: Using $_POST with Submit button
    ... > I wondered if anyone could further advice? ... In my script I was ... are both on the same script, this is the way of detecting when $_POST ... Visit Topic URL to contact author (reg. ...
    (comp.lang.php)
  • Re: Local Group Policy logoff script
    ... > have some Group Policy running on them, then you should be able to make a ... > The big problem I am having, is that I can't guarantee that the group ... > logon/logoff has been initialized on the machines that I will be running ... > script that I'm creating will not only setup my logon/logoff script ...
    (microsoft.public.win2000.group_policy)
  • Re: Is the shell command "mv" atomic
    ... >> the race condition you describe cannot occur. ... Your script is safe. ... > wouldn't like to guarantee that this means that the action is atomic. ...
    (comp.unix.programmer)
  • Re: Including a javascript relative to its own location from another javascript
    ... document.writeafter loading overwrites the document. ... guarantee that the markup is included, let alone a guarantee that it is ... you would simply write the other `script' element instead of generating it ...
    (comp.lang.javascript)