could you change the user in the php script... like exec("su password") or something like that?
$exec = "su password\n"; //or whatever the syntax is...
$exec .= "/etc/rc.d/init.d/named restart\n";
exec($exec);
i don't even know if that sort of thing will work, but let me know.