> We are running PHP 4 on a Solaris 2.7 box with Apache 1.3.11 with mod_perl
> 1.24.
> We need to communicate with 3rd-party Perl APIs from within PHP to handle
> processing of a form. The API functions each expect an associated array
and
> will return a result value to the calling party.

The Perl scripts munge the actual array passed in?...  I dunno if you can do
that...

> I would assume that we would use exec( 'perl cgi-bin/myscript.pl',
> $assoc_array, $return_value) to do this, placing the perl script I write
to
> handle the values in the server's cgi-bin directory.

I would expect it to be more like:

$command = "/usr/bin/perl cgi-bin/myscript.pl ";
while (list($key, $value) = each($assoc_array);
    $command .= "$key=$value ";
}
exec($command, $output, $error);
while (list(,$line) = each($output)){
    echo $line, "<BR>\n";
}
if ($error){
    echo "OS Error $error<BR>\n";
}

Not sure at all if myscript.pl will take the array that way:  You may need
to write a wrapper script to take key/value pairs and bundle them up to pass
off to myscript.pl



-- 
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