[thelist] PHP encrypting data with gnupg

Andrew Seguin asegu_evolt at borgtech.ca
Fri Feb 6 09:48:03 CST 2004


What are the permissions on /my/path/filename.gpg ? Considering the
webserver runs usualy under a different userid then your own, you have to
make sure that the account your webserver uses has access to the file.

To test that the script itself actualy works, try running it from the
command line since then your script will then be running under your
account.

> Hi folks,
>
> I'm trying to make a php script that creates a file, saves it, then
> encrypts
> the file using gnupg. sounds simple enough.
>
> For the encryption, I'm trying to use a technique similar to that
> described
> at..
>
> http://www.zend.com/zend/tut/tutorial-brogdon.php
>
> ...in that from PHP, I'm using:
> echo shell_exec("gpg -e -r recipient at there.com /my/path/filename");
>
> the problem I'm having is that this doesn't seem to be working. I'm not
> seeing /my/path/filename.gpg (which is what's supposed to happen) being
> created anywhere. At least nowhere that I can find...
>
> Furthermore, when I do this same command from the linux shell:
> gpg -e -r recipient at there.com /my/path/filename
> it works every time, without prompting me for any additional input.
>
> Does anyone have any idea as to what could be going wrong and how i might
> fix it?
>
> Thanks in advance for any advice you can offer.
>
> -jacques :)
> --
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>
>



More information about the thelist mailing list