Running php on Hortonworks sandbox

I am trying to design my front end for my back end services which involves hadoop and hive. I was successfully able to open up XAMPP server on port 8085 of Hortonworks 2.4. For that I had to stop httpd services already running. I was also successfull in writing php codes which talked with mySQL services. However some thing astonishing which I have noticed right away is that on firing hadoop or hive or ambari commands, this is what I am getting –
-bash: hadoop: command not found
-bash: hive: command not found
-bash: ambari: command not found
I think there is some problem with PATH Variables. Can u help me identify root cause and is it possible to run XAMPP services from inside of HDP 2.4 (which uses CentOS 6.9) ?

Source: stackoverflow-php