$username Posted February 23, 2010 Share Posted February 23, 2010 I ran into an issue running cmds through shell_exec. When you trigger a shell_exec it will open the exe as the Apache service user. By default Apache installs as a local system account. So if you need to connect to a remote server to run a cmd it will hang in the task manager. example shell_exec("psexec \\\\remoteComputer -i -d -s dnscmd /zoneadd domain.com /primary") When a cmd needs to access other servers you will need to make the Apache service run as a user that has access to other remote servers. http://httpd.apache.org/docs/2.2/platform/windows.html See the section about running Apache as a service This may not work for all cases but it seems to work for my issues when running cmds that needed more privileges -Brett Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.