If you want to use sudo you can do it with the fowling function:
function loginsu(){
$fhandle = @popen($sudo_path -u root clear, w);
$fputs( $fhanlde, $supassword);
@pclose($fhandle);
}
Dont forget to edit /etc/sudoers adding the folowing line
apache ALL=PASSWD:ALL
Do it at your own risk
- Original Message -
From: Johannes Tyra [BrainData] [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, March 13, 2002 3:06 PM
Subject: [PHP] Superuser for PHP Script
Hi,
I need superuser rights for a PHP Script, called by the Apache Webserver.
Is it possible to do this with ? exec (su)?? ? What is with the root
password??
Is there an other better way to do this?
How can I print the current user/group under php is running?
Thanx,
--
Mit freundlichem Gruß,
Johannes Tyra
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php