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
Executing perl from php
Moderator: General Moderators
-
codetester
- Forum Newbie
- Posts: 3
- Joined: Thu Aug 17, 2006 12:56 pm
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
I assume you're running Windows? In which case, it's typically selecting the file and/or path, right clicking and changing the permissions on it such that the user Apache runs under (which I believe is SYSTEM by default) has, at least, (I believe) execution rights. It may need read rights too.
Apache may need to be given rights to have interactive rights as well, which is done separately, but I can't remember how off the top of my head.
You may need/want to check your error logs to see if there is some other error that may be more simple than permissions.
Apache may need to be given rights to have interactive rights as well, which is done separately, but I can't remember how off the top of my head.
You may need/want to check your error logs to see if there is some other error that may be more simple than permissions.
-
codetester
- Forum Newbie
- Posts: 3
- Joined: Thu Aug 17, 2006 12:56 pm