0

I have server side code that call a perl script, in this way

exec("perl /home/horus/Instaladores/variant_effect_predictor/variant_effect_predictor.pl --everything --offline -i ../users/$username/$project/results/remove_duplicated_lines/BED_filtered/qual/StrandBalance/dbSNP/SnpEff/$vcf -o ../users/$username/$project/results/remove_duplicated_lines/BED_filtered/qual/StrandBalance/dbSNP/SnpEff/VEP/$vcf --stats_file ../users/$username/$project/results/remove_duplicated_lines/BED_filtered/qual/StrandBalance/dbSNP/SnpEff/VEP/$vcf.html",$output);

I try the same with exec, system and passthru without success.

If i made a echo right before the exec, all the variables are set acordingly

If i copy past the echo result in a Linux console,using the www-data from the folder where the php script is, everything works as expected

I have perl and the variant_effect_predictor.pl script in the sudoers file

www-data ALL=(ALL)NOPASSWD:/usr/bin/perl www-data ALL=(ALL)NOPASSWD:/home/horus/Instaladores/variant_effect_predictor/variant_effect_predictor.pl

any idea of what is going there? why php is not calling the script?

1 Answer 1

0

First step. See if you can run a hello world perl script from that location.

use strict;
use warnings;

print "Hello World\n";

If you can get that to work properly, then I suspect the problem are the relative paths you're sending as parameters. Try setting them to absolute paths and see if that helps.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.