I want to run gradlew
using PHP. What i have tried is using exec(), shell_exec,
or passthru
. I executed those commands inside a PHP script named "build.php". I tried calling the script from a browser or curl and got this error
Exception in thread "main" java.lang.RuntimeException: java.io.FileNotFoundException: /var/www/.gradle/wrapper/dists/gradle-2.2.1-all/6dibv5rcnnqlfbq9klf8imrndn/gradle-2.2.1-all.zip.lck (No such file or directory)
However when i called it from command line using php build.php
, it worked very well. I
I need the gradlew
command to be executed through user action from browser. My question: what might cause this error and how to get rid of it?
Thank you very much.