-3

I tried to run command line for local BLAST. I already download the package and allow the permission for every files and folders. But still I can't display the output of it at my page.

echo shell_exec("/opt/lampp/htdocs/blasto/bin/blastp -query /opt/lampp/htdocs/blasto/result/INF2dWxh -db /opt/lampp/htdocs/blasto/db/*.faa -evalue 10 ");

Hope anyone can help me with this.

1 Answers1

0

shell_exec will only return STDOUT. Any error messages written to STDERR will be lost unless you add 2>&1 to the end of your command. This will redirect anything written to STDERR (file descriptor #2) to STDOUT (file descriptor #1) which will be returned by shell_exec and displayed by echo. So, try this ...

echo shell_exec("/opt/lampp/htdocs/blasto/bin/blastp"
    . " -query /opt/lampp/htdocs/blasto/result/INF2dWxh"
    . " -db /opt/lampp/htdocs/blasto/db/*.faa"
    . " -evalue 10"
    . " 2>&1"
);
BareNakedCoder
  • 2,893
  • 2
  • 10
  • 14
  • I try that and come out with this ---> /opt/lampp/htdocs/blasto/bin/blastp: /opt/lampp/lib/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib/i386-linux-gnu/libstdc++.so.6) – amirin sofi May 16 '16 at 05:03
  • Great news! You now have the error message describing why it failed. You're much better off now than when you had nothing. – BareNakedCoder May 16 '16 at 10:58
  • thanks for your help. Somehow I managed to get the output after find libgcc_s.so.1 file. – amirin sofi May 17 '16 at 01:07