Linux and Php integration help .

I m devoloping a website which communicate with Linux server .
Whenever a page is loaded it runs one script on Linux server.

My problem is a simple commands like date , ls runs very smoothly. But whenever i execute big script.It wont display the output.

My knowledge of PHP is very less i m using simple echo command to run the script and display the output.

My php file:
Working Program:

<html>
<head><title>This is my page</title></head>
<body>
This is the content of my page.
<?php
print "Do you like it?";
?>
<?php
echo `date`;
?>
</body></html>

Output:

When i modify my php file as

<html>
<head><title>This is my page</title></head>

<body>
This is the content of my page.
<?php
print "Do you like it?";
?>
<?php
echo `ssh -ttq 10.180.8.231 ls -ltr`;
?>
</body>
</html>

Output:

However the command

ssh -ttq 10.180.8.231 ls -ltr

get executed properly on linux machine.

Please help.

Run your command

ssh -ttq 10.180.8.231 ls -ltr

... from your command line (save server, user ID, as web server) and post the output.

Thanks.

I have added rsa-key in 10.180.8.231 therefore it is not asking me any password .
Please find the output.
However I didnt get what you want to say about saving server,user ID as web server.
[root@OFSMUW-VMGR-51 html]# ssh -ttq 10.180.8.231 ls -ltr
total 22692
-rw-r--r-- 1 root root 604553 Dec 25 09:08 ovs-agent-2.3-27.noarch.rpm
-rw-r--r-- 1 root root 2576 Jan 19 00:02 install.log.syslog
-rw-r--r-- 1 root root 14061 Jan 19 00:02 install.log
-rw------- 1 root root 1265 Jan 19 00:02 anaconda-ks.cfg

---------- Post updated at 11:46 PM ---------- Previous update was at 11:03 PM ----------

I think i need to give bash script execution permission to apache? correct me if i m wrong.