Problem when executing a script in php?

0

I created a script to run a program automatically, it is correct because on command line in ubuntu it runs through the command:

/var/www/html/trabalhoTCC/view/needle.sh /var/www/html/trabalhoTCC/emboss/aaindexextract/alvos.txt  /var/www/html/trabalhoTCC/emboss/aaindexextract/modelos.txt

where needle.sh is my script that receives the al.txt and mod.txt files as a parameter.

In the terminal of ubuntu I can execute this command and have the output file of it, but when executing this command in php:

shell_exec('/var/www/html/trabalhoTCC/view/needle.sh /var/www/html/trabalhoTCC/emboss/aaindexextract/alvos.txt /var/www/html/trabalhoTCC/emboss/aaindexextract/modelos.txt');

I do not get the output, does anyone know what it can be?

    
asked by anonymous 04.08.2017 / 05:25

1 answer

2

Checks that exec() and shell_exec() functions are enabled in PHP.

Solution

The file / directory (folder) was not allowed enough so that the file could be executed.

The required permission was given using the chmod command.

    
04.08.2017 / 05:41