PHP exec() not executing batch files

Posted by Andreas Bonini on Stack Overflow See other posts from Stack Overflow or by Andreas Bonini
Published on 2010-06-09T10:45:58Z Indexed on 2010/06/09 10:52 UTC
Read the original article Hit count: 212

Filed under:
|
|
|

I tried googling for this issue and found many people with the same problem but no solution.

    $result = exec("C:\\Ruby191\\bin\\lessc.bat less\\$file", $output);

Here result is an empty string and output an empty array. Same thing with:

    $result = exec("cmd /c C:\\Ruby191\\bin\\lessc.bat less\\$file", $output);

I am sure the path is correct; I am sure exec() is enabled.

I tried exec, shell_exec, system and none work.

lessc is less CSS.

© Stack Overflow or respective owner

Related posts about php

Related posts about Windows