i have one problem with php and perl, i need execute perl script, from my website php with codeigniter, but the execution of the script is not evident. I explain better.
The perl Script generate one csv file, when i execute in console, it works perfectly, but when I run it from PHP, it does not generate the file, and it does not give any errors during the execution, so I think, it's just not running.
the script needs 3 input parameters, which are previously concatenated in the execution of the same. But even when I try to force the execution of the script, placing the values inside the execution command, nothing happens.
I have tried to execute it in the following ways:
$perl_script = './zc_csv_dist_crd_3.pl' . ' ' . $ctac_corre . ' ' . $codigo. ' ' . $num_dist;
exec($perl_script);
or
system($perl_script);
or directly
shell_exec("./zc_csv_dist_crd_3.pl 7736 311745421 42906");
#or
exec("./zc_csv_dist_crd_3.pl 7736 311745421 42906");
#or
system("./zc_csv_dist_crd_3.pl 7736 311745421 42906");
I want to clarify that I do not need a return value, even the perl script, has no return value, since the file is generated empty or with data, and both cases are valid. I've read that it can be a problem of permission, but I'm new to perl, php and linux. I leave the linux server features, with the hope that someone can guide me.
Very grateful with your help in advance.
PD: I have read patiently, the forums in stackoverflow, the PHP manuals and even then I can not make it work, I know I'm jumping something, but I can not see it by now.