ierpe Posted March 31, 2009 Share Posted March 31, 2009 hey, I need to stop and start a server application (on a windows system). The command line to start/stop the service is: net start blipserver or net stop blipserver I'm trying to execute with exec but it doesnt work. Does someone knows if something special has to be done in order to be able to start/Stop services in windows? Link to comment https://forums.phpfreaks.com/topic/151884-start-a-service-with-exec/ Share on other sites More sharing options...
Yesideez Posted March 31, 2009 Share Posted March 31, 2009 Not possible - security won't allow you to run applications on a PC. Link to comment https://forums.phpfreaks.com/topic/151884-start-a-service-with-exec/#findComment-797588 Share on other sites More sharing options...
ierpe Posted March 31, 2009 Author Share Posted March 31, 2009 Actually this is a local script, using php-cgi. Im using php here as a "shell scripting" since im never working on windows and that the scripting under windows is just a pain. Im using php here to connect to a server via ftp, if a new file has been uploaded, compare it, if different from last downloaded file, download it, stop the server, update application, restart server. And it works, i just did exec('net start blipserver', $output, $return_var); I know this wouldnt work for a web application, I forgot to precise i was using php in this case more as a shell script! Link to comment https://forums.phpfreaks.com/topic/151884-start-a-service-with-exec/#findComment-797594 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.