note 37089 added to function.system
| From: | tomlubbock at hotmail dot com | Date: | Sun, 02 Nov 2003 23:07:49 +0000 |
| Subject: | note 37089 added to function.system | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-59664@lists.php.net to get a copy of this message | ||
If you need to run root-level commands, such as to reboot a service, the utility 'sudo'
will let you handle linux permissions. In our example we use 'sudo' to allow apache
temporary root access to restart a service. We can then use:
system("sudo service dhcpd restart")
You also need to examine the /etc/sudoers file to specify what permissions to grant. Hope this helps
someone!
----
Manual Page -- http://www.php.net/manual/en/function.system.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+37089
Delete -- http://master.php.net/manage/user-notes.php?action=delete+37089&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+37089&report=yes
Search -- http://master.php.net/manage/user-notes.php