I am another person having trouble with the exec command. It has worked 
for me in the past, but not with the perl script I'm trying to exec today.

Here is my code:

        $command ="/home/kyelateas/cgi-bin/test.pl";
        exec($command, $return, $status);
        if ($return) {
                $return = implode("\n", $return);
                print "<pre>Data = $return\n\nStatus = $status</pre>";
                echo "No data returned";        

I have two perl scripts. One of them simply prints "hello world" 4 times 
with a newline after each time. This works fine and the php page prints 
out the "hello world" statement 4 times.

The problem is that I have another perl script which is a test script for 
an interface to an ecommerce server. It returns several lines of info 
describing the transaction. It works perfectly from the command line, but 
I can't get php to return any data when I use the above exec code on it. 
It's strange to me because from the shell they are pretty much the same. 
Type the path and name of the file to execute it and it returns a few 
lines of output. Why would this be any different for php? I know the 
script that connects with the ecommerce server takes a bit longer. Could 
that be the problem?

Thanks in advance.


PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to