Calling perl from php?

Qualeto

New Member
I have a php script that handles a form input. For design reasons both a bit out of my control, and which I do not entirely wish to change, I have to call a perl script with the parameters specified in the html form. I sanitized all inputs and then output them to a file called input, which is read by the perl script named, for sake of brevity in this question, script.pl. Script.pl should do some stuff and then write all outputs to a file named output.I call the perl script from php like so:\[code\]system('perl script.pl 2>errors');\[/code\]No good, nothing happens. output is not created, errors is not created, and the side effect does not occur. My apache runs as www-data user and group id. My directory is set with 775 settings with ownership as me:www-data. (My user name is replaced with "me" for sakes for privacy).My question is two fold:1) Am I doing this wrong? If so how should I improve upon the code?2) Is there a more sane way to catch errors in system execution?After programming in perl for a while, php feels like a pain in the ass. OS: Ubuntu server edition
 
Back
Top