Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 23rd June 2008, 08:43
torres torres is offline
Junior Member
 
Join Date: Apr 2008
Posts: 5
Thanks: 2
Thanked 0 Times in 0 Posts
Question how to reboot vyatta pc router via php?

i used vyatta pc router (linux based) and i have installed XAMPP for Linux 1.6.6 web server on my router. I would like to know how to reboot my vyatta via php script... I've tried to do that. Here's the scrpit :
/opt/lampp/htdocs/webvy/reboot.php
<?php
exec (/user/bin/sudo /sbin/reboot);
?>

/opt/lampp/htdocs/webvy/form-reboot.html
<a href="reboot.php">Reboot</a>

/etc/sudoers
apache ALL=/sbin/reboot,/opt/lampp/htdocs/webvy/reboot.php NOPASSWD

My script doesn't work and contain an error in /opt/lampp/logs/error_log :
password :
anybody know what's wrong with my script???
Reply With Quote
Sponsored Links
  #2  
Old 24th June 2008, 17:09
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,727 Times in 2,565 Posts
Default

Is Apache really running as the user apache, or is it maybe a different user?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 1st August 2010, 13:16
HaydenHarnet HaydenHarnet is offline
Junior Member
 
Join Date: Jul 2010
Posts: 9
Thanks: 0
Thanked 1 Time in 1 Post
Default

it can be done easily via javascript
__________________
Wireless routers home
linksys e3000 review

Last edited by HaydenHarnet; 8th August 2010 at 20:25.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ffmpeg Video support for ubuntu 7.10 [suphp-ispconfig] amaurib Installation/Configuration 13 16th February 2010 17:26
Freebsd 6.1 support misterm Installation/Configuration 10 9th April 2009 09:29
ispconfig php 5 errors itamarjp Installation/Configuration 8 25th April 2008 10:20
network issues now it says "401 The web site is blocked by administrator" Check General 3 26th February 2008 14:22
Apache2 Freezes celtic Server Operation 31 28th May 2007 17:18


All times are GMT +2. The time now is 22:49.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.