When following Kenneth's method for executing root scripts via the nanoweb server mentioned on this page you would most likely need to be able to run a text-mode browser like lynx and pass the php script to it (works great).
After struggling for a while (lynx kept asking me to download the file instead of executing it), I realised that I had to install php-cgi additionally and modify the nanoweb config file to use that php interpreter instead of /usr/bin/php. (On Debian this is the CLI version).
On Ubuntu 6.06:
apt-get install php5-cgi
After editing /etc/nanoweb/nanoweb.conf and a quick restart of the web server, lynx and links will execute your PHP scripts properly.
Hope this helps somebody else out there :)
Ruan Fourie