When I try to use the following command
exec('c:\test.bat');
The webpage just hangs, and not because the batch file is still running. Inside the batch file it just says
echo test > test.log
exec function does not seem to work for me
Moderator: General Moderators
-
lostconjugate
- Forum Newbie
- Posts: 5
- Joined: Tue Dec 07, 2010 3:14 pm
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: exec function does not seem to work for me
Does the webserver have permission to run test.bat?
(#10850)
-
AdrenalineSeed
- Forum Newbie
- Posts: 24
- Joined: Sat Oct 09, 2010 5:54 pm
Re: exec function does not seem to work for me
Good question, I tried putting the batch file in the wwwroot directory where network service has rights. But not sure if this is the account that PHP uses.
-
AdrenalineSeed
- Forum Newbie
- Posts: 24
- Joined: Sat Oct 09, 2010 5:54 pm