PHP Problem


Subject: PHP Problem
From: Brian ThunderEagle (furbs@mail.swjedi.net)
Date: Wed Jan 22 2003 - 20:52:03 AKST


I am driving myself crazy trying to figure this out, but I have faith in AKLUG
that someone has seen this before. I have built a bundle of Bash scripts that
can be used to set up users on my system. I have created forms on my web site
that eventually call these Bash scripts according to values recieved from the
forms. The problem is of course Apache does not run as root, and the scripts
run commands that require root. I have tried using a wrapper, I have tried
adding in "<< EOF" for every command called from the main script, but I cannot
get it to run successfully. exec(), passthru(), and system() all have yielded
no progress. Here is the way it works:

$install = "/var/www/html/scripts/add.sh user pass 1 1 1 1 1 1 0"; (for example)
exec(''.$install.'');

"/var/www/html/scripts/add.sh user pass 1 1 1 1 1 1 0";
/var/www/html/scripts/add.sh = primary script that runs 8 other scripts
user = username
pass = password
1 1 1 1 1 1 0 = What to install (sql web email dn dns chr lan)

If someone knows how to make a wrapper that you know works, or some way to get
around this problem IN ANY WAY please help. I want any possible solution at
this point. I have been searching how to do this for nearly 5 non-stop hours.

     Brian ThunderEagle
      - http://www.swjedi.net
      - furbs@swjedi.net
      - bthundereagle@aidea.org

-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/

---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.



This archive was generated by hypermail 2a23 : Thu Jan 23 2003 - 09:54:02 AKST