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: How to migrate my localhost php site to my ISP - Was: willing to learn php basics
    ... If your users can enter data, then the script must have at least some write privileges on the database. ... "The 1&1 60-Day Money Back Guarantee applies to the Instant Mail and Beginner packages as well as all shared hosting, ... There's a Business at GBP 9 per month, about the same as your Swiss one, which offers two 100MB MySQL databases plus perl and PHP. ...
    (Debian-User)
  • 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: aborting a bash script with control-c
    ... You get advice for free, ... where we invoke system- running a very short execution time ... script - for every line in the input. ...
    (comp.unix.shell)