Why PHP exec() won't work in Windows 8 when it worked in Windows 7? -


the following worked fine locally on windows 7, website on windows 8 , not work. run in apache web request:

exec('ffmpeg -i "c:\temp\testing.mp4" "c:\temp\testing.mp3"', $errors, $result);     var_dump($errors);     var_dump($result);     exit; 

gives: array(0) { } int(1)

$output = exec('ffmpeg -i "c:\\temp\\testing.mp4" "c:\\temp\\testing.mp3"', $errors, $result); var_dump($output); var_dump($errors); var_dump($result); exit; 

gives: string(0) "" array(0) { } int(1)

but if execute text c:\temp\testing.mp4" "c:\temp\testing.mp3 in command window in directory (path set ffmpeg), works fine.

i set rights on c:\temp users full control, mp3 file still not created. why statement not being executed in windows 8 executed in windows 7? how can find out more information why not creating mp3 file?

interestingly, works:

exec('copy "c:\\temp\\testing.mp4" "c:\\temp\\testing.mp3"', $result); var_dump($result); 

and yields:

array(1) { [0]=> string(30) " 1 file(s) copied." }  

i found answer:

after editing environment path variable, restart apache take effect in php.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -