Jump to content

exec, system, shell_exec not working


maxwel11

Recommended Posts

exec, system, shell_exec not working for me... my php is just made to execute/run a batch file. i have tried everything some dont give any echo back and some like system("cmd /c batch file") and echo exec("batch file") and echo shell_exec("batchfile") echo the content in the batch file with cmd directory like this. C:\dir\dir>start /d "C:\Program Files (x86)\dir\dir" programname.exe... batch file contain this "start /d "C:\Program Files (x86)\dir\dir" programname.exe"......i tried to add @echo off at the begining maybe this make it run the batch but no effect beside not echoing what in the batch file like explained before. also check if apache got admin permission and it does have admin perm. i tried everything cmd.exe removing cmd /c etcc but with no use also wanted to inform that batch file works when i launch it manually (double clicking it) and it launch the program but i want the php script to do so.. is it possible?

Thanks alot and would appreciate any help..
 

Link to comment
https://forums.phpfreaks.com/topic/296725-exec-system-shell_exec-not-working/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.