I realize there are various packages already created that allow you to work with SquidGuard via the web but I wanted to try something that I felt would be simple.  Using Apache Webserver and PHP4, I wanted to update various *.diff files, then send the commands: 'squidGuard -u, and squid -k reconfigure' through the web. 
 
I can update the diff file with no problem, but I am either unable to (1) execute 'squidGuard -u', or (2) execute 'squid -k reconfigure', or (3) both.
 
In PHP4, I'm using:
 
system("squidGuard -u",$ret1);
system("squid -k reconfigure","$ret2);
 
Upon completion of this part, the error code for $ret1 is 127.  The error code for $ret2 is 1.  This leads me to believe that it is the squidGuard -u command that is failing, although I could not find the meanings to the error codes.
 
I suspect that this is a file/directory permissions issue.
 
Should I be looking at ownership issues for squidGuard?  Currently, it is owned by 'squid'.  The PHP file that is attempting to execute these commands is also owned by squid.  I wonder if I should make it owned by Apache?  What I'm trying to do should not be too difficult, but...
 
If anyone can offer help, I'd appreciate it.
 
Jim O'Hern
Scotland County Schools, NC

Reply via email to