Page 1 of 1

exec not working on Windows 2008

Posted: Tue Nov 16, 2010 8:12 am
by spooky27
Hi,

I am trying to use the exec function via PHP code to execute a dos executable. Its working fine when i run the exact same code on Windows XP but there is no output on Windows 2008 server. Also, there is no error. The code looks something like:

exec('testbatch.bat");

I am using WAMP on Windows 2008. Strangely, there is no error or anything else in the apache log either. What could be the problem ? Is it a permission issue specific to Windows 2008 (exact same code works on Win Xp) ?

Please help!

Chetan

Re: exec not working on Windows 2008

Posted: Tue Nov 16, 2010 11:55 am
by s992
Server 2008 is really finicky with permissions, you should verify that you are running as administrator and that UAC is turned off.

Re: exec not working on Windows 2008

Posted: Wed Nov 17, 2010 8:24 am
by spooky27
thanks for your response s992.

what is UAC and how can i check if its turned off ?

Re: exec not working on Windows 2008

Posted: Wed Nov 17, 2010 11:05 am
by s992
UAC is the bane of all things good and holy.

I found this article to be a good resource for explaining what UAC is and how to turn it off.