Can't run GPG through php on linux (works fine through telnet)

David T-G davidtg-gnupg@justpickone.org
Tue May 21 14:02:02 2002


--uAKRQypu60I7Lcqm
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Andy --

Just a quick reply that I hope is helpful...

Yes, the web server will run as a certain user, and we all hope that
it isn't root :-)  It might be "nobody"; it might be "web" or "www" or
"apache" or who knows what.

I take it that this directory you made was created at your shell prompt
versus through your php script.  Can you create a directory in your
script?  Remember that it will probably not show up somewhere obvious
unless you specify the full path (/tmp/testdir), since it will either be
in the web user's home dir or somewhere under the web server docs tree
(or somewhere else, possibly, but those are the two biggies).

So you have a directory; you mentioned substituted filenames, but does
your $status_file have a full path or just a file name?  Similarly, what
about $keyring_file and $out_file and $in_file?

Instead of messing about with gpg, work first on just displaying a given
file on the web page; once you know that you're working in the right
ballpark, *then* try your encryption tricks.  Meanwhile, I rather doubt
that there is some trickery going on that keeps the web server owner from
running external scripts, but if all else fails it's worth trying.

Oh, yeah -- are you calling /full/path/to/gpg or just gpg?  There's a
good chance that /usr/local/bin (or wherever) isn't in the path...

I also have to ask...  Why not just use ssl since you're obviously using
a web server and a web client?


OK, so much for "quick" :-)  HTH & HAND

:-D
--=20
David T-G                      * It's easier to fight for one's principles
(play) davidtg@justpickone.org * than to live up to them. -- fortune cookie
(work) davidtgwork@justpickone.org
http://www.justpickone.org/davidtg/    Shpx gur Pbzzhavpngvbaf Qrprapl Npg!


--uAKRQypu60I7Lcqm
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE86VnVGb7uCXufRwARAuhfAJ451mlotbtUTm4yWdWVxiYBmz6ANACfRC0J
CT6nvdO4IFBLBiKPamBnumg=
=KobL
-----END PGP SIGNATURE-----

--uAKRQypu60I7Lcqm--