Hey guys, I need to capture the shell_exec output even if it fails. I'm trying to convert a video using ffmpeg and when I run shell_exec it returns null. Anyone know a trick to get the actual text instead of just null? I'm on windows xp if it makes a difference. Thanks.
I'll give you a tip, always read the comments on php.net If that doesn't work, try: Or http://www.php.net/manual/en/function.shell-exec.php#88052 Or http://www.php.net/manual/en/function.shell-exec.php#67183
I'm using wamp. This worked. Thanks PremiumScripts. add '2>&1' to the end of your shell command to have STDERR returned as well as STDOUT. $shell_return = shell_exec($shell_command." 2>&1");