I'm quite new to php and now I have a problem.
I wrote a PHP Script to edit my ACL propherities for squid.
Now when I have finished editing them, I have to restart squid.
I would like to do this also via Web (PHP)....
but how? I don't want my Apache (user: wwwrun) to run as root.
but wwwrun can't start squid. Only user "squid" with pass "mypass" can start or stop squid. How can I do this?
"exec(su squid /etc/init.d/squid start)"
won't do cos it wants a pass for user squid?
Can anybody help me please?
In this situation, i recommend create 2 script (i'm do that before, trying in Perl and PHP - worked), you may if you nanot do this in PHP you may do this in C/Bash shell.
first: login-script for root;
second: logout-script for root;
In PHP script you run first script, <UNIX command>, second script.
In BSDI and Solaris it's work.