windows - PHP exec cmd doesn't work in my case -


i've been looking around 2 days , can't find problem, i'm trying run simple cmd code works if run directly cmd console. when run php nothing happens, believe kind of permission problem, ideas?

this code i'm trying run, execute html5point_converter.exe converts ppt file html

exec("c:\\windows\\system32\\cmd.exe /c c:\\inetpub\\wwwroot\\html5pointsdk\\html5point_converter.exe \"c:\\inetpub\\wwwroot\\html5pointsdk\\arquivos\\upload1\\teste1.ppt\""); 

i've tried execute following code test if cmd inside php works, , working fine:

exec("c:\\windows\\system32\\cmd.exe /c dir", $output); 

i'm running on windows server 2008 r2, iis 7 , php 5.5 installed web plataform installer 5.

for test purpose i've set security permission full control in:

folder: c:\program files (x86)\php folder: c:\inetpub\wwwroot\html5pointsdk file: c:\windows\system32\cmd.exe file: c:\inetpub\wwwroot\html5pointsdk\html5point_converter.exe 

thanks in advance, yours, diogo araujo

edit 1 i've tested:

exec("c:\\inetpub\\wwwroot\\html5pointsdk\\html5point_converter.exe \"c:\\inetpub\\wwwroot\\html5pointsdk\\arquivos\\upload1\\teste1.ppt\"");  exec("c:\\windows\\system32\\cmd.exe /c start c:\\inetpub\\wwwroot\\html5pointsdk\\html5point_converter.exe \"c:\\inetpub\\wwwroot\\html5pointsdk\\arquivos\\upload1\\teste1.ppt\""); 

as highlighter indicates, have syntax error in code. need escape quotes inside string:

exec("c:\windows\system32\cmd.exe /c c:\inetpub\wwwroot\html5pointsdk\html5point_converter.exe \"c:\inetpub\wwwroot\html5pointsdk\arquivos\upload1\teste1.ppt\", $output); 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -