Please Cc: me on replies... I've got to be doing something stupid, because I've succeeded at this PGP (gpg, whatever) stuff before (years ago), but...
I'm doing this: $test = escapeshellarg($cleartext); exec("cat $test | /usr/bin/pgpe -a -t -f -r '[EMAIL PROTECTED]' --pubring=/home/bodyline/.pgp/pubring.pkr --secring=/home/bodyline/.pgp/secring.pkr", $result, $error); echo "TEST<BR>\n"; echo implode("<BR>\n", $result); if ($error){ echo "OS Error: $error<BR>\n"; } echo "END TEST<BR>\n"; I'm getting this output: -----BEGIN PGP MESSAGE----- Version: PGPfreeware 5.0i for non-commercial use MessageID: 3kStB52ChIWntEDMoGnXmy62k/g83h8g qANQR1DBwk4DyES2iJ7I3h4QC/4t4gfjedwU6InFgKPNFXWg05fDCVT465vays98 5f8uuQbSsecwjSOC8EuG/23yxLu8Cx+0utaz11/DiSym72YhTkxk38XQEAeP3wYT M4IRnH5T1JE7QvGif/MyqcmU3lOz5RQ7mqZtv+HmAs/gbW8E/sCSmiV4XEz/tv+e GkBg8/ga+KoL7HguGAg39Rbu5Ex1/sXW4l04+FFZyf2X9Pii1evr66QOxqIuqvsF ztomPJMiMdqYsn4hsbi9nOjBzf0pnFR4Z96SlnDURDwQ7M9O5Z4QO735UYTv+9gw 4A5jtKfXZsue2rC6gJ4QT+QZuk5KvjAlSh8/Dsrn5c6/gKWOz9Zn70VbhRqb4DT6 YGeCCFBjuGzCwL/RS+luNr5PxANFFfj0qS75SDRsvsEN0cUafRA8U9BbTLK+toEB y3JkQufZtAdC5aHD/QcWnkGojAaM/fK1ZHxLyp09VHjWpT+2TI76kmTOnfGLuuw3 N9688m9To7Hrn+pRNeyHT5+zm9cL/isNsdbuSW/4XO+W/niTGLpAI/jHt7HkCRpr LDvyoCDONT64xfqY17i16VBenH4KIdUIc+pz9qrETjBcRFJ7Z7JOeOrOxi/VQecT jgr6D+xt4Zpl16LXPcd5baGcs6uCl3MD1zyjMKLvlOjiZ5yZ482iyLvYcdplZ5/R +hP1GrkDwOZq1lsuJtJ6B/Ptz5E03A+bEQ9OAw4PHB214ZJ7apCuscTcBJOu7+wj 47wLLplEUOgMRIB+DZ8wp2Qq10+vYt3VyB8m6ef+Lq7bqT2bUioBoQg/gO4VSQrA sg/l4SGgc8wW7fvGRI4XmrSHhDJcYrRcRw8rJS9rsQXBKIUIUfIfVZ2v/iynEAlP qykTt84J8iHdFTYxwO4wwJC8w7Hahdc+AyYwsWANwmsF/QCZqzzWL76uTQ9ocasd lh9U5u2VJZcwJ20OVKziaAlXu8u0AGNaOaqW7EcTrImEar6pSNJC6PGy3ISSXkbW QFSHqJdsVUg873d/uMlrB8s0cI85kMkbb+162VCtITH/ckCxqtYiCwFvHVC+6Rq7 p1fD =6EMp -----END PGP MESSAGE----- I plug that into: /usr/bin/pgpv -f -o output Everything seems fine... Except output has this in it: ^Kb^Estdin^H^@^@^@ That ain't right. I've tried it with pasting the PGP MESSAGE and then ^D, and I've tried it with the message in a file, and I'm just completely stumped at this point. With and without -t as well. Pretty much the same thing. I can do a test from the command line without PHP getting involved, and it all works just fine as well... I've generated a second keypair and tried the second recipient (-r) and get the same thing. I dunno when it happened, but both pgp.com and gpg.org are useless now, so I dunno where to turn... And it *IS* working until PHP gets in the picture. PHP is running as a CGI and exec('whoami') tells me I'm the user who owns the keyring, and the output sure *LOOKS* like a PGP message, so, like, it's not that PGP isn't doing something with my input. I've tried it with the whole popen thing, and with the mkfifo thing for fake pipes, and I'll be durned if I can get those to do any better. I can make them worse, by making stupid mistakes, but not better :-) What am I doing that's stupid?... -- Got Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php