Jump to content

Recommended Posts

I have a PHP script within which I have embedded a Perl program using system command.

The Perl program is as under;

<code>

#!/usr/bin/perl
system("perl /opt/lampp/htdocs/matepred/blast/bin/scriptforblastcompleterun.pl sequence.txt uniprot_sprot.fasta > out");
system("perl /opt/lampp/htdocs/matepred/blast/bin/convert.pl");
system("perl /opt/lampp/htdocs/matepred/blast/bin/format.pl > output");
system("/opt/lampp/htdocs/matepred/blast/bin/svm-predict output pssm.scale.model pssm.predict >pssm.out");

<code>

 

The first four commands of this program run correctly, but the last one does not run. This one contains an executable named "svm-predict".

I guess this is because I need to grant special permissions to the PHP user for running executables.

 

Please suggest.

Link to comment
https://forums.phpfreaks.com/topic/281771-executable-not-running-in-php-script/
Share on other sites

Then it looks like the shell is executing correctly. Try redirecting stdout someplace in case there are errors.

system("/opt/lampp/htdocs/matepred/blast/bin/svm-predict output pssm.scale.model pssm.predict >pssm.out 2>pssm.err");
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.