Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

howto start proces via browser with php script using sudo



10:34 am on Jan 12, 2004 (gmt 0)

10+ Year Member


I wrote PHP script, to start vpnclient:


$result = exec("ping -c 4 X.X.X.X");

if ("$result?"!= "0") {

exec("/etc/init.d/vpnclient_init restart");



from shell as root user this script is working well.

my problem is:
howto start vpnclient via browser with this script using sudo?

kind regards


10:11 pm on Jan 12, 2004 (gmt 0)

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

Welcome to WebmasterWorld, cccc!

I don't use sudo [courtesan.com] myself, but it seems as though you need to have your sudoers [courtesan.com] file setup correctly first. But before going there, is this a Cisco VPN client you are starting? Why not have the client start whenever the server is started/rebooted?

Hopefully this bump will get some discussion started.


5:13 pm on Jan 31, 2004 (gmt 0)

10+ Year Member



exec("sudo -u root /etc/init.d/vpnclient_init restart");

is working well!



Featured Threads

Hot Threads This Week

Hot Threads This Month