php encryption

Chris Mason chris@net.ai
Wed Apr 4 15:48:03 2001


I'm still having problems getting this to work, even with the excellent
suggestions I have recieved from list members.
To take it down to baseics I hard coded everything.
Apache is running as apache, and I su'ed to apache and ran gpg -gen-key.
Then I imported the key username <user@user.com> tp the apache keyring and
signed it, and trusted it ""I trust fully".

The command I am using is
system("/usr/bin/gpg --encrypt --batch -ao 'test.gpg' -r 'username
<user@user.com>' 'test.txt' ");
If I su to apache and run it form the command line, it works.
When I run the page that calls the command, it doesn't.
If I change the command to:
system("touch test.txt");
the file is created, so I know php has the right permissions to create a
file.
I have checked /var/log/messages and /var/log/httpd/errors for errors, and I
don't see anything.

Can anyone shed any light on this?

Chris Mason
Box 340, The Valley, Anguilla, British West Indies
Tel: 264 497 5670 Fax: 264 497 8463
USA Fax (561) 382-7771
Take a virtual tour of the island
http://net.ai/ The Anguilla Guide
Find out more about NetConcepts
www.netconcepts.ai
Talk to me in real time with Instant Messenger: masonc92@hotmail.com
Signature
F331 8AD1 36FB B3B0 DF9F  D95B 8024 D1EA 7450 D50C

-----Original Message-----
From: gnupg-users-admin@gnupg.org [mailto:gnupg-users-admin@gnupg.org]On
Behalf Of Chris Mason
Sent: Wednesday, April 04, 2001 6:04 AM
To: gnupg-users@gnupg.org
Subject: php encryption


Hello  to everyone on the list, this is my first Gnupg post.
Has anyone managed to implement an encryption solution from PHP? I got stuck
at the need to pass the passphrase to the process. I tried "echo $pass |
gpgcommand" but it didn;t work.

What I am trying to do is to encrpyt a file (or a variable) from mod_php and
write it back to a file (or a variable). httpd will run as user httpd so I
have to run as gpg as another user, and encrpyt for the end user's public
key.
Any help appreciated.


Chris Mason
Box 340, The Valley, Anguilla, British West Indies
Tel: 264 497 5670 Fax: 264 497 8463
USA Fax (561) 382-7771
Take a virtual tour of the island
http://net.ai/ The Anguilla Guide
Find out more about NetConcepts
www.netconcepts.ai
Talk to me in real time with Instant Messenger: masonc92@hotmail.com
Signature
F331 8AD1 36FB B3B0 DF9F  D95B 8024 D1EA 7450 D50C


_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users