Executing perl from php
Posted: Tue Oct 10, 2006 12:57 pm
Hi All,
I'm trying to run a perl script from within php, but it's not working as I think it should.
The perl file runs fine when executed on its own via the command line, so there is no problem there.
In php, I do the following:
system('perl script.pl');
But nothing happens. If I do something like:
system('copy test.txt test2.txt');
it works fine, but for some reason doesn't run perl.
I also tried using exec(), but that didn't work either. Also, in case it couldn't find the perl.exe, I copied that into the same directory as the php script, but nothing changed.
I'm running Apache (possibly I need to set something up in the php.ini file??).
Help would be appreciated as I'm banging my head against a wall right now!!
Thanks,
CT
I'm trying to run a perl script from within php, but it's not working as I think it should.
The perl file runs fine when executed on its own via the command line, so there is no problem there.
In php, I do the following:
system('perl script.pl');
But nothing happens. If I do something like:
system('copy test.txt test2.txt');
it works fine, but for some reason doesn't run perl.
I also tried using exec(), but that didn't work either. Also, in case it couldn't find the perl.exe, I copied that into the same directory as the php script, but nothing changed.
I'm running Apache (possibly I need to set something up in the php.ini file??).
Help would be appreciated as I'm banging my head against a wall right now!!
Thanks,
CT