Are you executing this as the "squid" user or
as the "apache" (?nobody) user? You may find
you need to use a small SUID wrapper if you
intend to do "squid -k reconfigure" as some
other userid, other than the userid squid is
running as (or as root)...
Chris K.
Norman wrote:
> Chris Knipe wrote:
>
>> In PHP, you're looking for the exec() function.
>>
>> The command to execute, squid -k reconfigure
>> --
>> me
>>
>>
>> ----- Original Message ----- From: "Norman" <norman.elliott@ntlworld.com>
>> To: "Squid Mailing List" <squid-users@squid-cache.org>
>> Sent: Saturday, November 02, 2002 1:24 AM
>> Subject: [squid-users] Restarting Squid
>>
>>
>>
>>
>>> Hi,
>>> Please help if you can.
>>> I have been asked to set up squid for a local school so that
>>> a number of tutors can access 2 lists, one to allow access
>>> to specific sites and the other to be a general ban list
>>> something like
>>>
>>> .netscape.com
>>> .squid.org
>>>
>>> in one and
>>> .com
>>> .uk
>>> .es
>>> .net
>>> in the other
>>>
>>> I am trying to do this from a web interface on the squid server.
>>> I can get everthing to work using php except restarting squid.
>>> Any ideas please, or is this not possible?
>>> tia,
>>> norman
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>>
> Thanks Chris,
> I should have explained further
> When I tried :
> <?php
> exec("/usr/sbin/squid -k reconfigure ", $return);
> print "<BR>Returned: $return<BR>";
> ?>
>
> I get back:
> Returned: 1
>
> Which indicates that the exec failed.
> And changes in the 2 files have not worked
> because permissions stay the same.
> best wishes,
> norman
Received on Sat Nov 02 2002 - 02:03:32 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:11:08 MST