|
Posted by Jerry Stuckle on 01/18/07 18:39
Aaron Gray wrote:
> "Toby Inkster" <usenet200701@tobyinkster.co.uk> wrote in message
> news:bs7484-dcj.ln1@ophelia.g5n.co.uk...
>> Aaron Gray wrote:
>>
>>> The signal in the shell script works fine from root but will not work
>>> when
>>> called from PHP.
>> As Jerry indicated, you are probably trying to fix the wrong problem. If
>> we knew *why* you were trying to do this, then we might be able to tell
>> you an alternative to reloading Apache in the first place.
>
> Okay, I am working on putting to gether a server administration program
> thats written in PHP and runs in Apache. It needs to reload the
> configuration after adding, removing, or modifying the virtual web sites
> Apache is serving.
>
> The only simple way I can think of is to do a reload every 10 minutes or
> every hour, as a cron job, or so.
>
>> That having been said, look at "sudo".
>
> No that requires a password to be entered.
>
> Aaron
>
>
You mean like WebMin?
You can change the user (although I don't recommend it). Check out
posix_setgid() and posix_getuid().
And if you do change the user/group id, I recommend you first spawn
another process to do it, rather than trying to change it for the Apache
server itself.
Or, rather than killing Apache, why not execute a batch job which
gracefully brings it down and restarts it?
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|