Awww ... granting root privileges to PHP or a web server is never a good practice, no matter how secure your setup is.
How about PHP writing modified configuration files to a temporary directory:
/home/system/transfer/apache/httpd.conf
/home/system/transfer/system/dhcp.conf
/home/system/transfer/mysql/my.ini
a sudo cron, script, ( ) ?
, Web/PHP , , .