Note that there are some explanatory texts on larger screens.

plurals
  1. POapk does not compile on linux server when called from browser but works when called from terminal
    primarykey
    data
    text
    <p>I'm trying to compile and package apk on a linux headless server. here's what I've done so far:</p> <ul> <li>I installed android sdk, all ok</li> <li>I installed ant, all ok</li> </ul> <p>I am able to build an android project from terminal all ok and even I am able to call a bash file from the terminal, and it does build the apk for me fine. here's the bash file:</p> <pre><code>#!/bin/bash export PATH=$PATH:/var/www/zipalign export PATH=$PATH:/usr/local/ant/bin export PATH=$PATH:/usr/local/ant/lib export PATH=$PATH:/usr/share/doc/openjdk-7-jdk export PATH=$PATH:/root/android-sdk-linux export PATH=$PATH:/root/android-sdk-linux/tools export PATH=$PATH:/root/android-sdk-linux/platforms export PATH=$PATH:/root/android-sdk-linux/platform-tools export PATH=$PATH:/root/apache-ant-1.8.4/bin/ant export PATH=$PATH:/var/www/ant/bin ant release echo "DONE" </code></pre> <p>and then I am able to call the php file from terminal which runs the bash file and again it works fine and the apk is built. here's the php code:</p> <pre><code>&lt;?php $output = shell_exec("./javaApk.sh"); echo $output; ?&gt; </code></pre> <p>the weird thing is that when I call this php from browser, it does not build the apk! It just returns the following in the browser but no apk!</p> <pre><code>Buildfile: /var/www/1/air.com.domain.FreshApp/java_apk/build.xml DONE </code></pre> <p>and when I echo $PATH in my bash file (running the php from browser) I can see the following result which seems all fine</p> <pre><code>/usr/local/bin:/usr/bin:/bin:/var/www/uploads/zipalign:/usr/local/ant/bin:/usr/local/ant/lib:/usr/share/doc/openjdk-7-jdk:/root/android-sdk-linux:/root/android-sdk-linux/tools:/root/android-sdk-linux/platforms:/root/android-sdk-linux/platform-tools:/root/apache-ant-1.8.4/bin/ant:/var/www/uploads/ant/bin </code></pre> <p>any idea?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload