I'm trying to get gnupg (OpenPGP) working on my system, which is Solaris 2.6
on Sparc, with PHP 4.0.6 and Apache/Stronghold.

I have the program compiled, as it works at the command line.  Here's what
works at the command line:
/usr/local/bin/gpg --encrypt -ao /usr/local/www/htdocs/777/crypted -r
'<[EMAIL PROTECTED]>'
/usr/local/etc/www/htdocs/777/plain_text_mesage.txt

If I type the above at the command line, when logged in as the user Apache
and PHP is running as (nobody), it encrypts the contents of the file
/usr/local/etc/www/htdocs/777/plain_text_mesage.txt and writes it to the
file /usr/local/www/htdocs/777/crypted, which is what I want.  (The
directory /usr/local/www/htdocs/777/ is "chmod 777", and PHP can write a
file in that directory.)

I've tried everything I can think of, but it looks like a command from PHP
is not working like it is at the command line.

I've tried:

system("/usr/local/bin/gpg --encrypt -ao
/usr/local/www/htdocs/777/crypted -r '<[EMAIL PROTECTED]>'
/usr/local/etc/www/htdocs/777/plain_text_mesage.txt");

passthru("/usr/local/bin/gpg --encrypt -ao
/usr/local/www/htdocs/777/crypted -r '<[EMAIL PROTECTED]>'
/usr/local/etc/www/htdocs/777/plain_text_mesage.txt");

exec("/usr/local/bin/gpg --encrypt -ao /usr/local/www/htdocs/777/crypted -r
'<[EMAIL PROTECTED]>'
/usr/local/etc/www/htdocs/777/plain_text_mesage.txt");

$command= `(/usr/local/bin/gpg --encrypt -ao
/usr/local/www/htdocs/777/crypted -r '<[EMAIL PROTECTED]>'
/usr/local/etc/www/htdocs/777/plain_text_mesage.txt`;

(Each of the above 4 lines of code probably word wrapped in this email, and
the last line contains backtics, not single quotes.)

So, I'm stumped.  I was following the basics of the article at:
http://hotwired.lycos.com/webmonkey/00/20/index3a.html?tw=programming

Thanks,

Peter Janett

New Media One Web Services
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
New Upgrades Are Now Live!!!
Windows 2000 accounts - Cold Fusion 5.0 and Imail 7.1
Sun Solaris (UNIX) accounts - PHP 4.0.6, mod_perl/1.25,
Stronghold/3.0 (Apache/1.3.22), MySQL 3.23.43
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PostgreSQL coming soon!

http://www.newmediaone.net
[EMAIL PROTECTED]
(303)828-9882





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