Don't echo data to it, pipe it
something like:
========================================
$pgp_binary = "/usr/local/bin/pgp";
$pgp_id = "Adam Beecher";
$pgp_tmp = "/home/me/tmp_pgp/";
$pgp_file = tempnam($pgp_tmp,"PGP");
$pgp = popen("$pgp_binary -FEAT +VERBOSE=0 $pgp_id -o $pgp_file","w");
for($i=0;$i<count($hiddens);$i++)
{
fputs($pgp,"This is all highly encrypted data piped to pgp");
}
pclose($pgp);
$asc_file = "$pgp_file.asc";
if (file_exists($asc_file)){
$encrypted = join('',file("$pgp_file.asc"));
@unlink($asc_file);
}
else
{
print "Something went wrong, are the directory permissions
correct?";
}
========================================
Beware of the above wrapping ;)
HTH,
Jerry.
At 00:46 18/10/00 +0100, you wrote:
>Just implementing a PGP encryption script for someone there, and I notice
>in my
>travels that MS-DOS apparently has a limit on the amount of data you can
>put on
>the command line. I've put a fair wedge of data on the command line in the
>past
>doing this, but I'm wondering if there's a limit in Linux too, and if so, what
>it is?
>>Basically, the script uses the PHP exec() function with a command line like
>this:
>>echo $message | pgp -command-line-options
>>The $message would usually be form data.
>>Cheers,
>adam
>>>_______________________________________________
>Cork maillist - Cork at linux.ie>http://www.linux.ie/mailman/listinfo/cork
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!