Run a hadoop application written in java from php
Your PHP app can call the command line to launch the Hadoop jar. Usually the command is like
$HADOOP_DIR/bin/hadoop jar [your jar file] [command line options]
Then, you can wait until the command returns.I have used similar approach to launch Hadoop jobs from a Python web server.
In addition to the previous answer, if the machine is remote try:
ssh -i ~/.ssh/your_key.pub hadoop@server hadoop jar ...
if you are in AWS you can call elastic-mapreduce --list --active | grep -e "cloud name" to get the URL of your cloud (additional piping may be needed, but you get the idea)
Oh, don't forget to scp your jar first