LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Using PHP exec with java (https://www.linuxquestions.org/questions/linux-newbie-8/using-php-exec-with-java-863380/)

harchew 02-17-2011 02:54 PM

Using PHP exec with java
 
Hi izzit possible to use a php exec function to trigger a jar file using -java method? Basically I have a php file(index.php) written with the following code :

$output = exec('cd /opt/lampp/htdocs/ImageEditorFilters/; /opt/lampp/bin/jre/bin/java CBSim "/opt/lampp/htdocs/ImageEditorFilters/orginal.png" 3 "/opt/lampp/htdocs/ImageEditorFilters/new.png"');

However when I run the index.php, it doesn't trigger action.
Instead when I run this code in the terminal, it works perfectly well.

So is there any configuration needed to perform such action?
Oh btw I'm using XAMPP in linux ubuntu and CBSim.jar to convert some images.

http://homepage.mac.com/lpetrich/Col...m.html#use_app

szboardstretcher 02-18-2011 09:53 AM

Do you get any output in the logs? Errors perhaps?

harchew 02-18-2011 11:56 PM

No. Return empty and no error shown. Just wondering izzit possible to exec java in php?


All times are GMT -5. The time now is 11:44 PM.